Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use Tab to Complete WMI Class Names

$
0
0

Summary: Use Tab completion to type WMI class names in Windows PowerShell.

Hey, Scripting Guy! Question I am using WMI in the Windows PowerShell console and in the Windows PowerShell ISE, and I am having a hard time
           correctly typing the long convoluted class names. How can I simplify the process and be more accurate?

Hey, Scripting Guy! AnswerUse the Get-CimInstance cmdlet instead of the Get-WmiObject cmdlet. One advantage (among many) of the 
           Get-CimInstance cmdlet is that it will do Tab completion on WMI class names.
           (The alias for Get-CimInstance cmdlet is GCIM.)

GCIM <tab> #
(cycles through the WMI classes in the default root\cimv2 WMI namespace)

GCIM Win32_P<tab> #
(cycles through WMI class names beginning with the letter P (such as, Win32_PageFile)


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>