Collections:
Other Resources:
"Remove-PSSession" Cmdlet in Windows PowerShell
What is the "Remove-PSSession" cmdlet in Windows PowerShell?
✍: FYIcenter.com
You can use the "Remove-PSSession" cmdlet to remove one or more existing PSSessions in Windows PowerShell by using the "-id n" or "-name xxx" to specify the PSSession.
Here is an example of using the "Remove-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 PS C:\fyicenter> Remove-PSSession -id 2 PS C:\fyicenter> get-pssession Id Name ComputerName State ConfigurationName Availability -- ---- ------------ ----- ----------------- ------------ 1 Session1 office-server Opened Microsoft.PowerShell Available
⇒ Example of PowerShell Session on Remote Computer
⇐ Connect to Existing PSSession in Windows PowerShell
2016-10-13, 2340🔥, 0💬
Popular Posts:
How to view system properties on Windows Server 2012? I just want to get some basic information abou...
What files are stored in the "C:\Users\<userid >\AppData\LocalLo w"folder? Can I delete...
What is naPrdMgr.exe process - Network Associates NAI Product Manager? Process naPrdMgr.exe is the p...
How to download and install JDK (Java SE Development Kit) 6? If you want to download and install JDK...
Extracting All Files from a ZIP File 1. Run WinZIP and select menu File > Open Archive. The "Open Ar...