How To: Display all Methods for All Classes in a WMI Namespace using PowerShell

Yes, that title is a bit cryptic – if you’ve worked a bit in WMI with PowerShell, you’ll see this code and (hopefully) think “Cool.” If you’re new to PowerShell and/or WMI, well, hang on to your hat, we’ll start diving into these soon to see how we can use them.

This example command displays all methods under the root\ccm\clientsdk namespace – this is a namespace that you will find on all ConfigMgr 2012 clients.

get-wmiobject -namespace root\ccm\clientsdk -list | select __Path -Expand Methods | select Origin, Name, __Path | out-gridview

Greg

How to: Query MachineOU information from ConfigMgr using PowerShell

With the Application Model in ConfigMgr 2012, you can create requirement rules based on Machine OU. Here’s a quick script to see what the ConfigMgr 2012 client has stored as the Machine OU:

( gwmi global_machineOU -namespace root\ccm\cimodels).MachineOU

Happy Scripting!

Greg

ramseyg@hotmail.com