guyrleech

Get instances of all CIM classes in a given namespace

May 5th, 2020
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ns='root/CIMV2/TerminalServices';CimClass -Namespace $ns | Where-Object { $_.cimclassname -notmatch '^(__|MSFT_|CIM_|WMINET_)'} | select -expand CimClassName | ForEach-Object { $_;'=' * $_.Length;Get-CIMInstance -namespace $ns -ClassName $_ -EA SilentlyContinue }
Add Comment
Please, Sign In to add comment