Today I thought I would share a one-liner that I recently wrote to query the Manufacturer, Model, and Serial Number information from numerous remote servers. Sounds simple enough, right? This one-liner starts out by using my New-MrCimSessionfunctionto create a CIM session to each of the specified servers. This function automatically determines if the remote server supports the WSMan protocol and falls back to DCom if it doesn’t: Get-CimSession | Select-Object -Property Name, ComputerName, Protocol Two different WMI classes are needed to retrieve the necessary information.
I recently discovered that Windows 10 adds a DelayedAutoStart property to the Win32_Service WMI Class: Get-CimInstance -ClassName Win32_Service -Filter "Name = 'MapsBroker'" | Format-List -Property * I’ve verified that this property does not exist on prior operating systems such as Windows 8.1 even when they’re updated to the production preview version of PowerShell version 5. I had written a Hey, Scripting Guy! Blog article on how to query the registry of remote machines to “Exclude Delayed Start Services when Checking Status with PowerShell” that shows how to retrieve the necessary information to accomplish this task on other OS’s, but it’s nice to see that Microsoft has finally made this information easier to retrieve.