Configure a WSUS client using PowerShell

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of Zuldan Zuldan 9 months ago.

  • Author
    Posts
  • #36298
    Profile photo of Kiran
    Kiran
    Participant

    I want to configure a Windows Server 2012 to be a client of a WSUS server that is on the network. I want to use PowerShell and avoid using Active Directory.

    From a WSUS client server with PowerShell 4 and Windows Server 2012 RS, I tried this three line script:

    $wsusserver = 'FQDNofWSUSserver'
    [void][reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")
    $wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer($wsusserver,$False)

    I got this: "Unable to find type [Microsoft.UpdateServices.Administration.AdminProxy]. Make sure that the assembly that contains this type is loaded..."

  • #36301
    Profile photo of Stig Sörnsen
    Stig Sörnsen
    Participant

    Maybe you could try to edit the local security policy on the computer.
    Please be aware that the local sec policies will get overridden if a similar GPO is targeting the computer.

  • #36305
    Profile photo of Zuldan
    Zuldan
    Participant

You must be logged in to reply to this topic.