< Back

Get-MrRemotePSSession

Sat Jan 18, 2020 4:35 pm

NAME Get-MrRemotePSSession



SYNOPSIS

Retrieves a list of the Windows PowerShell sessions that are connected to the specified remote computer(s).





SYNTAX

Get-MrRemotePSSession [[-ComputerName] <String[]>] [[-Credential] <Object>] [<CommonParameters>]





DESCRIPTION

The Get-MrRemotePSSession function gets the user-managed Windows PowerShell sessions (PSSessions) on remote

computers even if they were not created in the current session.





PARAMETERS

-ComputerName <String[]>

Specifies an array of names of computers. Gets the sessions that connect to the specified computers.

Wildcard characters are not permitted. The default value is the local computer.



Required? false

Position? 1

Default value $env:COMPUTERNAME

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Credential <Object>

Specifies a user credential. This function runs the command with the permissions of the specified user.

Specify a user account that has permission to connect to the remote computer. The default is the current

user. Type a user name, such as `User01`, `Domain01\\User01`, or `User@Domain.com`, or enter a PSCredential

object, such as one returned by the Get-Credential cmdlet. When you type a user name, this cmdlet prompts

you for a password.



Required? false

Position? 2

Default value [System.Management.Automation.PSCredential]::Empty

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

String





OUTPUTS

PSCustomObject





NOTES





Author: Mike F Robbins

Website: http://mikefrobbins.com

Twitter: @mikefrobbins



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-MrRemotePSSession -ComputerName Server01, Server02 -Credential (Get-Credential)













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>'Server01', 'Server02' | Get-MrRemotePSSession -Credential (Get-Credential)















RELATED LINKS





CommonParameters : True

WorkflowCommonParameters : False

details : @{name=Get-MrSavedCredential; noun=; verb=}

Syntax : @{syntaxItem=System.Object[]}

parameters : @{parameter=System.Object[]}

inputTypes : @{inputType=}

returnValues : @{returnValue=}

aliases : None



remarks : None

alertSet :

description :

examples :

Synopsis :

Get-MrSavedCredential [[-Target] <string>] [<CommonParameters>]



ModuleName : MrToolkit

nonTerminatingErrors :

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

Name : Get-MrSavedCredential

Category : Function

Component :

Role :

Functionality :





CommonParameters : True

WorkflowCommonParameters : False

details : @{name=Get-MrScheduledTask; noun=; verb=}

Syntax : @{syntaxItem=System.Object[]}

parameters : @{parameter=System.Object[]}

inputTypes : @{inputType=}

returnValues : @{returnValue=}

aliases : None



remarks : None

alertSet :

description :

examples :

Synopsis :

Get-MrScheduledTask [[-ComputerName] <string[]>] [[-TaskName] <string>] [[-Credential]

<Object>] [<CommonParameters>]



ModuleName : MrToolkit

nonTerminatingErrors :

xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10

xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10

xmlns:maml : http://schemas.microsoft.com/maml/2004/10

Name : Get-MrScheduledTask

Category : Function

Component :

Role :

Functionality :