array foreach powershell code example
Example 1: foreach powershell
ForEach($user in $users){
Write-Output $user
}
Example 2: powershell foreach
ForEach-Object
[-InputObject <PSObject>]
[-Begin <ScriptBlock>]
[-Process] <ScriptBlock[]>
[-End <ScriptBlock>]
[-RemainingScripts <ScriptBlock[]>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]