Created
September 22, 2017 12:40
-
-
Save nicholasdille/bbee4dc6506319df32a68929c4fd42ad to your computer and use it in GitHub Desktop.
PowerShell Sessions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$SessionOption = New-PSSessionOption -OutputBufferingMode Drop -IdleTimeout (60*60*2*1000) | |
Invoke-Command -ComputerName Server2 -SessionOption $SessionOption -InDisconnectedSession -Name MySession | |
Get-Session | |
$MySession = Get-Session -ComputerName Server2 | |
Enter-PSSession -Session $MySession |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment