Invoke-Command -ComputerName “AnyPC” { $cmd1 = “cmd.exe” $arg1 = “/c” $arg2 = “echo y | gpupdate /force /wait:0” &$cmd1 $arg1 $arg2 }
We take the Sh out of I.T.
Invoke-Command -ComputerName “AnyPC” { $cmd1 = “cmd.exe” $arg1 = “/c” $arg2 = “echo y | gpupdate /force /wait:0” &$cmd1 $arg1 $arg2 }