Category Archives: CIM

Get-SupportedFileSystems

I stumbled on the Get-SupportedFileSystems cmdlet today. Its part of the Storage module and is defined as a function. Digging a bit further its from a CDXML module based on a CIM class. But which CDXML file contains the definition? … Continue reading

Posted in CDXML, CIM, Powershell, PowerShell and CIM | Leave a comment

Filter early and WQL

What’s wrong with this: Get-CimInstance -ClassName Win32_Service | where {$_.State -eq ‘Running’ -and $_.StartName -notlike ‘LocalSystem’ -and $_.StartName -notlike ‘NT Authority*’} |select PSComputerName, Name, DisplayName, State, StartName Nothing except that its inefficient. if you ran this against a remote machine … Continue reading

Posted in CIM, PowerShell and CIM, PowerShell and WMI | Leave a comment

Open source PowerShell and OMI

  OMI – the Open Source CIM server is available on github https://github.com/Microsoft/omi This appears to be a later version than currently shown on the open group web site Combine this with open source PowerShell https://github.com/PowerShell/PowerShell and the DSC on … Continue reading

Posted in CIM, DSC, Open Source, Powershell | 1 Comment

IIS information

In my recent post about getting server information from a IIS web server I said I post about getting similar information from later machines. You still have the root\MirosoftIISv2 namespace available if you install the IIS 6.0 tools but one … Continue reading

Posted in CIM, PowerShell and CIM, PowerShell and IIS, PowerShell and WMI | Leave a comment

CDXML filter parameters

I was recently asked about adding a filter parameter to a cmdlet created through CDXML. If you’ve not seen it before (see PowerShell and WMI Chapters 18 & 19 from http://www.manning.com) CDXML allows you to creat ecmdlets by wrapping a … Continue reading

Posted in CIM, Networking, PowerShell and CIM, PowerShell and WMI | Leave a comment

BinaryMiLog cmdlets

It’s not often I come across soemthing brand new in PowerShell but yesterday when I was investigating New-CimInstance I discovered 2 cmdlets in the CimCmdlets module I hadn’t noticed before. These are: Export-BinaryMiLog Import-BinaryMiLog The cmdlets are used to export, … Continue reading

Posted in CIM, PowerShell and CIM, PowerShell and WMI | Leave a comment

New-CimInstance cmdlet and the–Key parameter

I was asked a question about the –Key parameter on New-CimInstance today. I wasn’t sure of the answer so I’ve done some experimentation. I tend to avoid New-CimInstance if I can preferring to use the Create method on the CIM … Continue reading

Posted in CIM, PowerShell and CIM, PowerShell and WMI | Leave a comment

WMI wildcards and filtering

A question on the forum asking about filtering WMI results raises a number of interesting points. The user wanted to pass a computername and a filter term to pull product information from remote machines. I ended up with this $computername … Continue reading

Posted in CIM, PowerShell and CIM, PowerShell and WMI, Powershell Basics | 1 Comment

WMI linked classes

You will find that many WMI classes have links – some are associations built in to WMI (a subject for another time) while other classes can be linked based on property values. An example of the latter is the Win32_NetworkAdapter … Continue reading

Posted in CIM, PowerShell and WMI | Leave a comment

NICs with IP addresses

A question on the forum asked about discovering those network adapters that had IP addresses configured. The user had tried PS> Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter “IPAddress IS NOT NULL”Get-WmiObject : Invalid query “select * from Win32_NetworkAdapterConfiguration where IPAddress IS NOT … Continue reading

Posted in CIM, PowerShell and CIM, PowerShell and WMI | Leave a comment