PowerTip: Find PowerShell Cmdlets that Accept CIM Session

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 

Comments (3)

  1. tommymaynard says:

    I noticed the same problem as Vern. Using -Parameter was ambiguous as the shell thinks I am entering shorthand for ParameterName or ParameterType. As he stated, it should be -ParameterName.

  2. tommymaynard says:

    Actually if wanted to use shorthand we could enter -ParameterN so the parameter would no longer be ambiguous.

  3. Vern_Anderson says:

    I had to use the full parameter name to get it to work!
    Get-Command -ParameterName CimSession

Skip to main content