Deleting list of clients in WSUS

Welcome Forums General PowerShell Q&A Deleting list of clients in WSUS

Viewing 0 reply threads
  • Author
    Posts
    • #221655
      Participant
      Topics: 3
      Replies: 6
      Points: 38
      Rank: Member

      Hi,

      I am trying to delete the list of servers to our WSUS server but was not able to successfully do it.

      I am using this script, hoping that you might be able to correct what is wrong with it.

      $Computername = ‘WSUSServer’
      $UseSSL = $False
      $Port = 8530

      [reflection.assembly]::LoadWithPartialName(“Microsoft.UpdateServices.Administration”) | Out-Null
      $Wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::GetUpdateServer($Computername,$UseSSL,$Port)
      $Group = $wsus.GetComputerTargetGroup(‘a0a08746-4dbe-4a37-9adf-9e7652c0b421’)
      $Clients = Get-Content C:\BackUp\PScripts\SDO\serverlist.txt
      $Device = $Wsus.SearchComputerTargets($Clients)
      $client[0].Delete()

      • This topic was modified 1 month, 1 week ago by edefer6380.
Viewing 0 reply threads
  • You must be logged in to reply to this topic.