User Case: Made a group policy update and want all the machines to pick up the update. especially in VDI (XenDesktop/View) environment.
[code language=”powershell”]
$computers = 1..333 | % { "CTX-XD-WIN7" + $_.ToString("000")}
Invoke-Command -ComputerName $computers -ScriptBlock {gpupdate /force /target:computer}
[/code]