How to get *tmux* experience using Powershell to work remotely on a Windows server? [closed]
When you use Enter-PSSession
and exit with Exit-PSSession
, The Session is Permanently deleted and you can't resume it.
However, You can Create a Remote Session like this:
$session = New-PSSession -ComputerName $ComputerName
And Then Connect into it
Enter-PSSession $session
This way You Can disconnect (but the session will remain connected)
Exit-PSSession
And Reconnect again (and come back to the same state)
Enter-PSSession $session
As long as $session
variable is available the session remains open and all your work remain in the same state
To Disconnect the Session:
Disconnect-PSSession $session
To remove the Session:
Remove-PSSession $session