PowerShell for Windows Admins:

CIM


April 16, 2014  11:30 AM

WMI against remote machines



Posted by: Richard Siddaway
CIM, PowerShell 3, PowerShell v4, WMI

WMI is a great tool for managing your Windows machines – I’d argue that PowerShell wouldn’t be as powerful as it is without WMI. If you question that remember that 60% of the additional cmdlets in Windows Server 2012 & 2012 R2 are CDXML based i.e. publish a WMI class as a PowerShell...

April 14, 2014  2:43 PM

Status of Office software



Posted by: Richard Siddaway
CIM, Office 2010, Office 2013, PowerShell 3, PowerShell v4, WMI

You can also use the SoftwareLicensingProduct CIM class to test the status of your Office products. Get-CimInstance -ClassName SoftwareLicensingProduct -Filter "Name LIKE 'Office%'" | where PartialProductKey | select Name, ApplicationId, LicenseStatus You need to be careful with Office...


April 13, 2014  5:50 AM

Checking license activation



Posted by: Richard Siddaway
CIM, PowerShell 3, PowerShell v4, Windows Server 2012, Windows Server 2012 R2, WMI

I’m building some virtual machines for my demo’s at the upcoming PowerShell summit. To make the demo’s, and setup, more interesting(?) I decided to use some Server Core instances. The usual setup activities become a bit more interesting with Server Core – particular Windows...


April 7, 2014  12:49 PM

Finding the class key



Posted by: Richard Siddaway
CIM, PowerShell 3, PowerShell v4, WMI

Time to extend our module for investigating CIM. This time I want to show you how to find the key to the class. You need to know the key property of a CIM class when you perform a number of actions – most particularly when you create an instance of the class. Its just a matter of iterating...


April 4, 2014  12:18 PM

Discovering namespaces part 2



Posted by: Richard Siddaway
CIM, PowerShell 3, PowerShell v4, WMI

I recently showed how to use Get-CimInstance to discover the namespaces present in a particular CIM namespace. I’m going to try to use CIM instaed of WMI but expect the old terminology to creep in occasionally. The function I showed last time will only find the first level of namespaces in a...


April 2, 2014  11:43 AM

CIM snippets–working with file system



Posted by: Richard Siddaway
CIM, File System, PowerShell 3, PowerShell v4, WMI

The latest instalment from the WMI team on using PowerShell and the CIM cmdlets is available -

Bookmark and Share     0 Comments     RSS Feed     Email a friend


March 28, 2014  2:35 PM

Discovering namespaces



Posted by: Richard Siddaway
CIM, PowerShell 3, PowerShell v4, WMI

Next point on the journey of discovery through CIM is finding the namespaces installed on a machine. I showed how to do this using Get-WmiObject in PowerShell and WMI but this time round decided to come up to date and use Get-CimInstance function get-cimnamespace { param...


March 27, 2014  2:49 PM

Improving CIM/WMI method discovery



Posted by: Richard Siddaway
CIM, PowerShell 3, PowerShell v4, WMI

I recently showed how to create a function that could be used to simplify the use of Get-CimClass. In this version I’ve added some features: - parameter validation - namespace - try-catch round getting the class information. This turns the code into: function Get-CimMethod...


March 23, 2014  4:51 AM

Discovering CIM/WMI methods and parameters



Posted by: Richard Siddaway
CIM, PowerShell 3, PowerShell v4, WMI

As you’ve probably gathered I spend a lot of time working with, and investigating, CIM (WMI) classes. CIM and WMI will be treated as synonymous for these articles. If you want to discover the methods available on a CIM class you can do this: $class = Get-CimClass -ClassName...


March 18, 2014  1:05 PM

WMI type accelerators



Posted by: Richard Siddaway
CIM, PowerShell, WMI

Something you don’t see used very often but that you need to be aware of are the WMI type accelerators. These were introduced as part of PowerShell 1.0 and have continued to be available in later versions. A type accelerator is a shortcut to using a .NET class – remember everything in...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: