Accessing WMI Instances Directly

If you know the path to a WMI instance, you can access it directly by converting the WMI path to a WMI object:

[wmi]'Win32_Service.Name="W32Time"'
[wmi]'Win32_Logicaldisk="C:"'

You can also specify the full WMI path, including a machine name to access WMI objects on remote systems (provided you have sufficient access rights):

[wmi]'\\SERVER5\root\cimv2:Win32_Service.Name="W32Time"'

Twitter This Tip! ReTweet this Tip!


Posted Sep 03 2010, 08:00 AM by ps1
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.