Hi. im trying to find a solution for our servers (windows 2008R2) when they are going to be pached we have to login to ech server and enable windows update services and start it. I think that this can be done through a invoke-comand script…
Have tried with following scripts Next issue is - After Pathed is done is should disable and stop the services
It would be faster to use New-PSSession to create a bunch of session objects against $ServerList. You can then use those sessions with Invoke-Command instead of -ComputerName. Re-using those sessions is a lot quicker than spinning up new sessions each time. See, “Secrets of PowerShell Remoting” on our ebooks menu.
Hmm sorry for bad english, AfterPatched is done. I trying to say that after the servers are patched and done the wuauserv must be stopped and set in disabled.
So, there’s no easy or straightforward way of detecting when the installation is complete. It all depends on the patch being installed. You may have to loop every 5 minutes, for example, and query something like Win32_QuickFixEngineering to see if the hot fix ID shows as installed or not.
We use BatchPatch for patching all servers remotely and it works really good.
Just need to get this wuauserv up and kicking before and i dont want to login on each machine for this.