I have this PowerShell version 2 function ...
function Get-Sids{
#[CmdletBinding()]
param ([string]$all_sids)
$all_sids | foreach-object { $_.Substring(20) }
return $all_sids
}
The substring method is removing the first 20 characterss of the string like I want it to. The problem is it is only doing it on the first element of the array.
Example input
$all_sids = "000000000000000000testONE", "000000000000000000testTwo", "000000000000000000testThree"
output
stONE 000000000000000000testTwo 000000000000000000testThree
I shouldn't need to move to the next element in the array, right? What am I missing?