April 14th, 2015

PowerTip: Use PowerShell to Find Cmdlets that Use CIM

Doctor Scripto
Scripter

Summary: Use Windows PowerShell to find cmdlets that use CIM.

Hey, Scripting Guy! Question I want to see what Windows PowerShell cmdlets will use a CIM session, but when I use Get-Command,
           only a couple things return. How can I fix this?

Hey, Scripting Guy! Answer Windows PowerShell automatically loads modules, but when looking for parameters, it does not load modules.
           Therefore, if you want to see all the commands that use a CIM session, first load the modules, then search for 
           commands that accept the CIMSession parameter, for example:

Get-Module -ListAvailable | Import-Module

Get-Command -ParameterName cimsession

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.