There are two ways of creating foreach statements in PowerShell
$b = 'hans','soren','ib','poul','hanne','william','ann-marie'$b | Foreach-Object {Write-Host $_}
Or
$b = 'hans','soren','ib','poul','hanne','william','ann-marie'
Foreach ($a in $b) {Write-Host $a}
1 comment:
thanks.
simple and clear
Post a Comment