xouvang
asked on
Powershell gpupdate to OU
How would you do a mass gpupdate /force to a OU?
I can do it a single computer by
I looked up a few commands and they are referring to "Invoke-GPUdate" but I get an error message
The code I'm putting in is
I get the error message
Any ideas? Or any new code I should try?
Thanks!
I can do it a single computer by
Get-ADComputer $computername | Invoke-Command -ScriptBlock {gpupdate}
I looked up a few commands and they are referring to "Invoke-GPUdate" but I get an error message
The code I'm putting in is
Get-ADComputer -Filter * `
-SearchBase "ou=WIN7_WIN8,ou=Workstations,dc=corp,dc=testtest,dc=com" | `
foreach{Invoke-GPUpdate -Computer $_.Name -force -RandomDelayInMinutes 0}
I get the error message
Invoke-GPUpdate : The term 'Invoke-GPUpdate' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
Any ideas? Or any new code I should try?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
is there a reason why you need to force update that fast instead of waiting until the next update interval?