Good morning, Scripting Guys. I recently completed a project to install Windows 2008 R2 Service Pack 1 on 550 servers.
Looking for a powershell script to remotely run the command: dism /online /cleanup-image /spsuperseded /hidesp on these 550 servers.
I tried and out error code 87 because of UAC. I used psexec with starting CMD.exe remotely then using dism /online /cleanup-image /spsuperseded /hidesp
I searched Google and Technet and could not find a powershell script already, which is strange. I would like to see if you guys could assist in creating a powershell script to assist with this. I know that this command does not require a start and need to confirm that these servers do not restart and add the /norestart switch for confirmation. I have local administrator rights on all these servers as well.
Thank you!
Chris