Collections:
Other Resources:
Connect to Existing PSSession in Windows PowerShell
How to connect to an existing PSSession in Windows PowerShell?
✍: FYIcenter.com
You can use the "Enter-PSSession" cmdlet to connect to an existing PSSession
in Windows PowerShell by using the "-id n" or "-name xxx" to specify the PSSession.
Here is an example of using the "Enter-PSSession" cmdlet to connect to existing PSSession:
PS C:\fyicenter> get-pssession Id Name ComputerName State ConfigurationName Availability -- ---- ------------ ----- ----------------- ------------ 1 Session1 office-server Opened Microsoft.PowerShell Available 2 Session2 mail-server Opened Microsoft.PowerShell Available PS C:\fyicenter> enter-pssession -id 1 [office-server]: PS C:\Users\fyicenter\Documents> [office-server]: PS C:\Users\fyicenter\Documents> query user USERNAME SESSIONNAME ID STATE IDLE TIME fyicenter rdp-tcp#0 2 Active . [office-server]: PS C:\Users\fyicenter\Documents> exit PS C:\fyicenter> PS C:\fyicenter> enter-pssession -name Session2 [mail-server]: PS C:\Users\fyicenter\Documents> [mail-server]: PS C:\Users\fyicenter\Documents> exit PS C:\fyicenter>
⇒ "Remove-PSSession" Cmdlet in Windows PowerShell
⇐ "Get-PSSession" Cmdlet in Windows PowerShell
2016-10-15, ∼4015🔥, 0💬
Popular Posts:
What is "SynTPEnh Caller Service" in my Windows 7 service list? And how is "SynTPEnh Caller Service"...
How to burn or record MP3 music files as audio tacks to audio CD (Compact Disk Digital Audio or CD-D...
This is what I do Charms bar >Settings> Change my PC settings > User > "Trust this PC" When I get my...
What is the installed program "Microsoft .NET Framework 4.5.1 SDK" on my Windows 7 computer? "Micros...
How to unblock a publisher? 1. Open Internet Explorer. 2. Click the Tools button, and then click Int...