New PSSessionCustom - PPOSHGROUP/PPoShTools GitHub Wiki
PPoShTools -> New-PSSessionCustom.ps1
Creates PS Session object depends on parameters passed
New-PSSessionCustom [-ComputerName] <String> [[-Credential] <PSCredential>]
[[-ConfigurationName] <String>] [[-SessionName] <String>] [<CommonParameters>]
Accepts ComputerName, Credentials and ConfigurationName as parameters to create PS Session. If no credentials are given, current credentials are used.
Computer name of the nodes where the PS Session will be established.
- PipelineInput: false
- Required: true
A PSCredential object that will be used when opening a remoting session to any of the $Nodes specified.
- PipelineInput: false
- Required: false
PowerShell Configuration name to use (JEA).
- PipelineInput: false
- Required: false
Custom Name for PSSession
- PipelineInput: false
- Required: false
New-PSSessionCustom -ComputerName 'SomeServer' -Credential (Get-Credential) -SessionName
Will use {SomeDomain\SomeUser} to create PSSession to computer {SomeServer} Created PSSession to computer {SomeServer}
Id Name ComputerName ComputerType State ConfigurationName Availability
-- ---- ------------ ------------ ----- ----------------- ------------
5 WinRM5 SomeServer RemoteMachine Opened Microsoft.PowerShell Available