Quantcast
Channel: CIM – PowerShell for Windows Admins
Browsing latest articles
Browse All 117 View Live

CIM_ or Win32_

If you dig into the classes available on a Windows machine you’ll see a mixture of prefixes – namely CIM_ and Win32_ used for the classes. So which should you use CIM_ or Win32_ Lets start by seeing...

View Article


CIM references and associations

Way back in 2011, when I were just a young lad, I wrote about WMI or CIM references and associations – https://wordpress.com/read/blogs/16267735/posts/1673 ASSOCIATORS show the end point of the link...

View Article


WMI and CIM accelerators

In PowerShell an accelerator is a shortcut to a .NET type. The WMI accelerators have been around since PowerShell v1. The WMI accelerators were heavily used in v1 fill some of the gaps in cmdlet...

View Article

user logon time

Saw an interesting question about user logon time. How can you tell the logged on user and when they logged on $logon = Get-CimInstance -ClassName Win32_LogonSession | sort StartTime -Descending |...

View Article

File searches with WMI

I saw a question about file searches with WMI. If you just know the file name it’s a very slow process. Painfully slow. If you have an idea about the folder its much quicker. function get-wmifile {...

View Article


CIM_Component class

I saw a question about the CIM_Component class and wondered what it was. So I tried it PS> Get-CimInstance -Namespace root\CIMV2 -ClassName CIM_Component | select -f 1 | fl * GroupComponent :...

View Article

Windows Server 2019 updates with CIM

Windows Server 2019 updates with CIM remain the same as all server versions post Windows Server 2016. This code will check for and install any updates. Micorosft Update or WSUS will be used depending...

View Article

Logon sessions

Saw a question about logon sessions that had me looking at CIM class Win32_LogonSession. I really don’t like the example code they have – code shouldn’t posted that contains aliases especially the...

View Article


Volume friendly name

When you use Get-Volume one of the properties displayed is the volume friendly name PS> Get-Volume -DriveLetter C DriveLetter FriendlyName FileSystemType ———–     ————         ————– C...

View Article


Testing Windows activation

Testing Windows activation from PowerShell involves a little dive into CIM (WMI). At its simplest a function like this function test-activation { $ta = Get-CimInstance -ClassName...

View Article
Browsing latest articles
Browse All 117 View Live