Link to home
Start Free TrialLog in
Avatar of crp0499
crp0499Flag for United States of America

asked on

Need some powershell help please

I have two WSUS servers.  Of course, each one has classifications and products.  What I need is a report that shows what classifications I am downloading and what products I am downloading updates for.  <---excuse the preposition.

Of course, I need these two reports in CSV format for dissemination to others.

Thanks you powershell gurus

Cliff
Avatar of Qlemo
Qlemo
Flag of Germany image

Which OS do you want to use? With PS 4 and 2012+ (or W8+ and RSAT tools) you can use special cmdlets (see https://technet.microsoft.com/itpro/powershell/windows/wsus/index), prior to that you have to cope with an assembly  Microsoft.UpdateServices.Administration - see https://msdn.microsoft.com/en-us/library/microsoft.updateservices.administration(v=VS.85).aspx).
Avatar of crp0499

ASKER

It's server 2012r2
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@Qlemo: I also looked at that but it doesn't return the configured settings just what is available


PS C:\Users\david\Documents> Get-WsusClassification -Verbose
VERBOSE: Are you sure you want to perform this action?.WSUS

Title                                                              ID                                                                
-----                                                              --                                                                
Applications                                                       5c9376ab-8ce6-464a-b136-22113dd69801                              
Critical Updates                                                   e6cf1350-c01b-414d-a61f-263d14d133b4                              
Definition Updates                                                 e0789628-ce08-4437-be74-2495b842f43b                              
Drivers                                                            ebfc1fc5-71a4-4f7b-9aca-3b9a503104a0                              
Feature Packs                                                      b54e7d24-7add-428f-8b75-90a396fa584f                              
Security Updates                                                   0fa1201d-4330-4fa8-8ae9-b877473b6441                              
Service Packs                                                      68c5b0a3-d1a6-4553-ae49-01d3a7827828                              
Tools                                                              b4832bd8-e735-4761-8daf-37f882276dab                              
Update Rollups                                                     28bc880e-0592-4cbf-8f95-c79b17911d5f                              
Updates                                                            cd5ffd1e-e932-4e3a-bf74-18bf0b1bbd83                              
Upgrades                                                           3689bdc8-b205-4af4-8d4a-a63924c5e9d5                              
User generated image Drivers is NOT Selected
My hope was that the objects have a "enabled" or similar property ... But all I can see in examples is .Product.Title resp. .Classification.Title, and seemingly the ID. Looks like the result is an accessor to IUpdateClassification interface, but that doesn't help much further - there isn't something we could derive enabled/disabled state from either.
Maybe the only way to know a classification or product is enabled in WSUS is by getting the number of associated updates - if there are no updates, the classification is either new or disabled.