January 27th, 2014

PowerTip: Find PowerShell Cmdlets that Accept CIM Session

Doctor Scripto
Scripter

Summary:  Learn how to find all Windows PowerShell cmdlets that accept a CIM session.

Hey, Scripting Guy! Question How can I find a list of all the Windows PowerShell cmdlets that accept a CIM session?

Hey, Scripting Guy! Answer Use the Get-Command cmdlet and specify the –CimSession parameter:

Get-Command -Parameter CimSession

Note  If you rely on dynamic loading of modules and you have not loaded a module,
this command will not report it. To ensure accurate results, load all of the modules first:

Get-Module -ListAvailable | Import-Module 

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.