Looking to change update server via powershell

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 5 years, 9 months ago.

  • Author
    Posts
  • #6458

    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

    }

You must be logged in to reply to this topic.