I have to implement a change to a PKI CA that will require gpupdate /force on all DC’s in the forest (multi child domains) to receive the registry addition(s) in a timely manner.
How can I run a PS one liner to invoke-command to accomplish that if I have (so far) this discovery bit of scripting? I’m unclear after the pipe how to accomplish.
I have 45 DCs to run gpupdate against. Does invoke-gpupdate have a throttle limit on the number of processes this will use against my DC’s. I want to ensure all of them recieve the gpupdate.
I seem to recall in Month of Lunches (returned to library) that there was a limit with Invoke-Command so wondered about invoke-gpupdate similarly.
If you take a look at the -Computer parameter for Invoke-GPUpdate, you’ll notice that it only accepts a single computer, while the -ComputerName parameter of Invoke-Command accepts multiple computers. Compare Get-Help -Name Invoke-GPUpdate -Parameter Computer and Get-Help -Name Invoke-Command -Parameter ComputerName. See the square brackets –> . Those indicate it’ll take more than one at a time. Therefore, there’s no need for a -ThrottleLimit parameter. In addition, since we’re piping computer names to the cmdlet, it’s only going to process one computer at a time anyway.