locked
Export All WSUS Client Computers into CSV\Excel) RRS feed

  • Question

  • Hello Friends,

    I have WSUS server into Windows server 2016.

    I need help to export all wsus client detail including their Hostname,IP address and OS name.

    Note: I have already tried to get this with power shell command Get-WsusComputer -All but this did not display all computers so please help someone.

    Sunday, September 3, 2017 8:40 AM

Answers

  • Hello Amit,

    As a workaround, you can export all the computers to aexcel file from the WSUS management console firstly.

    From the console, you can select all the computers, and then choose Status Report from the right-click menu.

    On the report page, you can save it to a Excel file, in which will include all the computers. Please see the following screenshot.

    Additionally, could you please run the following command in PowerShell?

    (Get-WsusComputer -All).Count
    (Get-WsusComputer -IncludeDownstreamComputerTargets).Count
    Besides, can you search out the computer by using the following command, which is not retrieved by using command "Get-WsusComputer -All"?

    Get-WsusComputer -NameIncludes "contoso"

    Best regards,

    Andy Liu


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


    Wednesday, September 6, 2017 2:33 AM
  • Hello Nedim,

    After running the below command I got correct result.

    Get-WSUSComputer | Select-Object FullDomainName,IPAddress,ComputerRole | export-csv C:\wsus.csv

    Thanks.

    One more thing like FullDomainName,IPAddress,ComputerRole can I include also O/S details ??

     

    • Marked as answer by Amit kumar JKT Tuesday, September 12, 2017 1:02 PM
    Tuesday, September 12, 2017 12:43 PM
  • Hi Andy,

    Count command is showing correct number.

    • Marked as answer by Amit kumar JKT Tuesday, September 12, 2017 1:01 PM
    Tuesday, September 12, 2017 12:44 PM

All replies

  • Get-WSUSComputer is the correct cmdlet to use, but you'll need to pipe it to expand the information. Get-WSUSComputer | Select-Object BiosInfo -ExpandProperty "BiosInfo"

    I'm not at my WSUS Server right now but this may help you expand your PowerShell commands to get the information you need.


    Adam Marshall, MCSE: Security
    http://www.adamj.org

    Sunday, September 3, 2017 6:59 PM
  • Hello Amit,

    I can retrieve all the client computers with the following command, including computer name, IP address and OS.

    Get-WsusComputer -All

    I just want to double confirm that you only can retrieve partial client computers, or you can't retrieve any one with this command.

    In addition, is there any downstream wsus server? If so, please use the following command.
    Get-WsusComputer -IncludeDownstreamComputerTargets


    Best regards,
    Andy Liu 

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

    Monday, September 4, 2017 2:08 AM
  • Hello Andy,

    we have approx 5000 client machines and no any downstream wsus server.

    Get-WsusComputer -All cmdlet displays 1500 clients only, why I am not sure.

    Monday, September 4, 2017 10:52 AM
  • Hello Adam,

    we have approx 5000 client machines and no any downstream wsus server.

    Get-WsusComputer -All cmdlet displays 1500 clients only why i am not sure.

    Pls help.

    Monday, September 4, 2017 10:54 AM
  • Hello Amit,

    How many client computers are displayed in the WSUS management console? 

    Additionally, how did you export the output to the excel file, is there any limit for the command?



    Best regards,
    Andy Liu

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

    Tuesday, September 5, 2017 2:50 AM
  • Hello Andy,

    Total 5200 clients showing in my wsus management console.

    But Get-WsusComputer -All  showing only 1500 clients.

    Pls help.

    Tuesday, September 5, 2017 2:01 PM
  • To export the data in powershell I have used select all and copy and paste into excel method. 
    Tuesday, September 5, 2017 2:06 PM
  • Hi,

    What do you get if you run for example. Do you see all of them in excel

    Get-WSUSComputer | Select-Object FullDomainName,IPAddress,ComputerRole | export-csv C:\wsus.csv

    Or to make it easier run only this to get only computer name so that you can sort it in excel

    Get-WSUSComputer | Select-Object FullDomainName | export-csv C:\wsus.csv

    ------------------------------------------------------------------------------------------------------------
    If you found this post helpful, please give it a "Helpful" vote. 
    Please remember to mark the replies as answers if they help.

    nedimmehic.org






    • Edited by Nedim Mehic Tuesday, September 5, 2017 2:23 PM
    Tuesday, September 5, 2017 2:20 PM
  • Hello Amit,

    As a workaround, you can export all the computers to aexcel file from the WSUS management console firstly.

    From the console, you can select all the computers, and then choose Status Report from the right-click menu.

    On the report page, you can save it to a Excel file, in which will include all the computers. Please see the following screenshot.

    Additionally, could you please run the following command in PowerShell?

    (Get-WsusComputer -All).Count
    (Get-WsusComputer -IncludeDownstreamComputerTargets).Count
    Besides, can you search out the computer by using the following command, which is not retrieved by using command "Get-WsusComputer -All"?

    Get-WsusComputer -NameIncludes "contoso"

    Best regards,

    Andy Liu


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


    Wednesday, September 6, 2017 2:33 AM
  • Hello Andy,

    When I run above count command I get error msg like below:

    Get-WsusComputer : There is an error in XML document (1, 6627297).
    At line:1 char:2
    + (Get-WsusComputer -All).Count
    +  ~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (Microsoft.Updat...ComputerCommand:GetWsusComputerCommand) [Get-WsusCompu 
       ter], InvalidOperationException
        + FullyQualifiedErrorId : UnexpectedError,Microsoft.UpdateServices.Commands.GetWsusComputerCommand

    Even now this error comes when I run get-wsuscomputer command in powershell

    .  
    Thursday, September 7, 2017 12:00 PM
  • Hello Amit,

    You can try the method introduced by RickoT1031 in the following thread. It's very possible that this is a DB issue.

    https://social.technet.microsoft.com/Forums/lync/en-US/241ed50f-d727-4078-898a-24b5cfefa677/powershell-cmdlet-xml-error?forum=winserverwsus

    Best regards,

    Andy Liu


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

    Friday, September 8, 2017 2:02 AM
  • Hello Nedim,

    After running the below command I got correct result.

    Get-WSUSComputer | Select-Object FullDomainName,IPAddress,ComputerRole | export-csv C:\wsus.csv

    Thanks.

    One more thing like FullDomainName,IPAddress,ComputerRole can I include also O/S details ??

     

    • Marked as answer by Amit kumar JKT Tuesday, September 12, 2017 1:02 PM
    Tuesday, September 12, 2017 12:43 PM
  • Hi Andy,

    Count command is showing correct number.

    • Marked as answer by Amit kumar JKT Tuesday, September 12, 2017 1:01 PM
    Tuesday, September 12, 2017 12:44 PM
  • The save as function is about as useful as a chocolate fireguard. It simply puts the items it would have printed on paper in individual tabs, so it is impossible perform any useful analysis.
    Wednesday, November 13, 2019 4:32 PM