Invoke-Command -ComputerName "AnyPC" {
$cmd1 = "cmd.exe"
$arg1 = "/c"
$arg2 = "echo y | gpupdate /force /wait:0"
&$cmd1 $arg1 $arg2
}
April 27, 2022April 27, 2022
0 Comment
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
}