Advertisement
guyrleech

Show interesting CIM class instances for namespace chosen

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