Author Posts

January 1, 2012 at 12:00 am

by russelljspicer at 2013-04-26 09:51:01

Let me start off by saying that I am very new to powershell.

I am looking for a way to change the pointer to my WSUS server via powershell. I know how to make the change via the registry key and Invoke-Command but i do not want to have to change execution policy and have powershell on every system that i modify.

Anyone know what WMI class is used for this?

by ArtB0514 at 2013-04-26 09:53:28

Is the remote registry service running on the machines? If so, then this would be a very good starting point:

http://psremoteregistry.codeplex.com/

by russelljspicer at 2013-04-26 11:11:27

Awesome! This works perfectly. Anyone else that needs to do this here is an example:

$computerlist = "C:\myscripts\computer.txt"

$arrComputers = get-Content -Path $computerlist
foreach ($strComputer in $arrComputers) {

$key = "software\policies\microsoft\windows\windowsupdate"

$updateserver = "http://UPDATESERVER"

set-regstring -computername $strcomputer -key $key -value WUserver -data $updateserver

}