Collections:
Other Resources:
"Get-PSSession" Cmdlet in Windows PowerShell
What is the "Get-PSSession" cmdlet in Windows PowerShell?
✍: FYIcenter.com
You can use the "Get-PSSession" cmdlet to get the user-managed Windows PowerShell sessions ("PSSessions") on local and remote computers.
Here is an example of using the "Get-PSSession" cmdlet:
PS C:\fyicenter> New-PSSession office-server Id Name ComputerName State ConfigurationName Availability -- ---- ------------ ----- ----------------- ------------ 1 Session1 office-server Opened Microsoft.PowerShell Available PS C:\fyicenter> new-pssession mail-server Id Name ComputerName State ConfigurationName Availability -- ---- ------------ ----- ----------------- ------------ 2 Session2 mail-server Opened Microsoft.PowerShell Available 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
As you can see from the test, "New-PSSession" cmdlet creates a new PSSession and keeps it in the background. "Get-PSSession" cmdlet displays all existing PSSessions in the background.
See the next tutorial on how to connect an existing PSSession.
⇒ Connect to Existing PSSession in Windows PowerShell
⇐ "Enter-PSSession" Cmdlet in Windows PowerShell
2016-10-15, 2568🔥, 0💬
Popular Posts:
How to add a program into the startup folder? If you find an interesting program that you want to ad...
What is muweb.dll - DLL File - Microsoft Update Web Control? muweb.dll is the Microsoft Update Web C...
How to remove AcroIEHelper.dll - Adobe Acrobat IE Helper Version 6.0 for ActiveX? DLL AcroIEHelper.d...
What is "IKE and AuthIP IPsec Keying Modules" in my Windows XP service list? And how is "IKE and Aut...
How to remove CLI.exe from startup program list? CLI.exe is a configuration program for the ATI grap...