CmdID

CmdID / PowerShell / Cmdlets / Get

Get-CimSession

Gets the CIM session objects from the current session. PowerShell reference

From the PowerShell reference 4 parameters Alias gcms

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Gets the CIM session objects from the current session. By default, the cmdlet gets all of the CIM sessions created in the current PowerShell session. You can use the parameters of Get-CimSession to get the sessions that are for particular computers, or you can identify sessions by their names or other identifiers. Get-CimSession does not get CIM sessions that were created in other PowerShell sessions or that were created on other computers. For more information about CIM sessions, see about_CimSession.

Get-CimSession [[-ComputerName] <String[]>] [<CommonParameters>]
Get-CimSession [-Id] <UInt32[]> [<CommonParameters>]
Get-CimSession -InstanceId <Guid[]> [<CommonParameters>]
Get-CimSession -Name <String[]> [<CommonParameters>]

Get CIM sessions from the current PowerShell session

New-CimSession -ComputerName Server01, Server02 Get-CimSessionIdentify

Get the CIM sessions to a specific computer

Get-CimSession -ComputerName Server02Identify

Get a list of CIM sessions and then format the list

Get-CimSession | Format-Table -Property ComputerName, InstanceIdIdentify

Get all the CIM sessions that have specific names

Get-CimSession -ComputerName Serv*Identify

Get a specific CIM session

Get-CimSession -Id 2Identify

Its page in the reference: Get-CimSession.

Parameters

4 in the PowerShell reference
-ComputerNameSpecifies the name of the computer to get CIM sessions connected to. Wildcard characters are permitted.
-IdSpecifies the identifier of the CIM session to get. For multiple IDs, use commas to separate the IDs or use the range operator (..) to specify a range of IDs. An Id is an integer that uniquely identifies the CIM session within the current PowerShell session. For more information about the range operator, see about_Operators.
-InstanceIdSpecifies the instance IDs of the CIM session to get. InstanceId is a globally-unique identifier (GUID) that uniquely identifies a CIM session. The InstanceId is unique, even when you have multiple sessions running in PowerShell. The InstanceId is stored in the InstanceId property of the object that represents a CIM session.
-NameGets one or more CIM sessions which contain the specified friendly names. Wildcard characters are permitted.