none
Check WSUS Client Status by Powershell RRS feed

  • 질문

  • HI 

    We have 2k12 r2 WSUS server

    While We after doing patching i need check status of every server manually on WSUS console for Specific group.

    It Easy when All patches are approve then its show Client 100 % Complaint.

    But some time some patches are not approve that make very long process to check every client manually in update needed. it will take time.

    i need smart way in the could please help me with so i can check specific group client status i.e i need only check all client approve  patches status it reboot pending or installed.

    i did some search. is below command will work or in need something else please help me. // abc is group name

    Get-WsusComputer -ComputerTargetGroups abc -ComputerUpdateStatus FailedOrNeeded -IncludeDownstreamComputerTargets InstalledPendingReboot,Downloaded,installed,Failed -Approval approve

    regards 

    iliyas momin

    2019년 11월 18일 월요일 오후 3:07

모든 응답

  • Hi Iliyas Momin,
       

    You can refer to the following methods to get the categories of each type of update for each client:  
        

    1. Please use this site to get the PoshWSUS module.
      Please refer to this article to add the PoshWSUS module to the module library of the WSUS server and complete the connection to the WSUS server.
         
      * Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
          
    2. Use the "Get-PSWSUSUpdatePerClient" command to complete the following additional conditions:
      #Updates have been installed
      Get-PSWSUSUpdatePerClient  | Where-Object -FilterScript {$_.Computername -eq "ComputerFQDN" -and $_.UpdateInstallationState -eq "Installed"}
      
      #Updates not installed (Unfinished download)
      Get-PSWSUSUpdatePerClient  | Where-Object -FilterScript {$_.Computername -eq "ComputerFQDN" -and $_.UpdateInstallationState -eq "Notinstalled"}
      
      #Updates not installed (Completed download)
      Get-PSWSUSUpdatePerClient  | Where-Object -FilterScript {$_.Computername -eq "ComputerFQDN" -and $_.UpdateInstallationState -eq "Downloaded"}
      
      #Updates pending reboot
      Get-PSWSUSUpdatePerClient  | Where-Object -FilterScript {$_.Computername -eq "ComputerFQDN" -and $_.UpdateInstallationState -eq "InstalledPendingReboot"}
         
    3. If used for counting, add "| Measure-Object" after any script.
      e.g:
      #Updates have been installed (CountNum)
      Get-PSWSUSUpdatePerClient  | Where-Object -FilterScript {$_.Computername -eq "ComputerFQDN" -and $_.UpdateInstallationState -eq "Installed"} | Measure-Object
         

    Hope the above can help you.
       

    Regards,
    Yic

    Please remember to mark as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    2019년 11월 19일 화요일 오전 1:58
  • HI Yic Kv

    Thanks for you reply . I really appreciate it.

    But i need to check for specific group member client complaint status.

    lets i explain the scenario to understand my concern.

    Every time we do patching for specific computer group. after patching we check every client update needed status . 

    its easy when all patches are approved then client show 100  % complaint .

    but its difficult when we all patches are not approved . then  we need go in in every client update needed status and check all approve patches are installed or not . We skip not approve patches.

    i need simple way in that i can see my specific computer group  all client update needed status which contain approve status n patches kB article. 

    thanks in advance

    iliyas

    2019년 11월 19일 화요일 오후 12:13
  • Hi iliyas,
      

    Sorry for the I'm not very good at Powershell scripts.
    You can consider the method of this article, with the Microsoft.UpdateServices.Administration.UpdateScope class to build the object of the query you need: "Get Windows Update Status Information by Using PowerShell".
       

    Hope the above can help you.
       

    Regards,
    Yic

    Please remember to mark as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    2019년 11월 22일 금요일 오전 7:06