PowerTip: Find PowerShell Cmdlets that Accept CIM Session

PowerTip: Find PowerShell Cmdlets that Accept CIM Session

  • Comments 3
  • Likes

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 

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • I had to use the full parameter name to get it to work! Get-Command -ParameterName CimSession

  • 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.

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