Output Log for PSWindowsUpdate module

Frequent Contributor



I'm deploying PSWindowsUpdate module to manage Windows Updates on around 70 servers.

I've already deployed remotely the module and now I can check for updates and install them (tried on 1 server as example). 

So what I need first of all is to extract a list of available updates to a central location for analysis, so I can make some tests and then prepare the deployment of the updates.

So first question, is it possible to export the output into a csv format, so I can easily ingest that from all my servers to analysis?

Second question, when getting the available updates, is it possible to get the update category as well? I know it's possible to search of a specific category using the parameter -Category. But I would like to sort that into the output file.


2 Replies
best response confirmed by dmarquesgn (Frequent Contributor)


I never use PSWindowsUpdate, but let's try to resolve this.

I used the cmdlet Get-WUList.

You wont be able to export the result by simply pipelining it to export-csv as the object is a Collection You can see this by running  (Get-WUList).GetType()

Anyway, you still can export it by using the following line

(Get-WUList).GetEnumerator() | Export-Csv -Path C:\MyUpdate.csv

Same thing applied for the category.





That was exactly what I needed. Thank you so much, and I've learned something new.

I'm trying to get the "Category" or "RootCategories", but as it's a parameter for the cmdlet, I'm not being ablet to understand how will I extract "Category" or "RootCategories".