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, 2577🔥, 0💬
Popular Posts:
I have created a table in MS Access. How do I create a form to help enter data into the table? Assum...
What is "Google Update Service (gupdate)" in my Windows 7 service list? And how is "Google Update Se...
Why am I getting errors when starting Apache server to load PHP as a module with php5apache2.dll? If...
What is PHP? PHP is a widely-used general-purpose scripting language that is especially suited for W...
What is the startup program "IDT PC Audio - sttray64.exe" on my Windows 8 computer? Can I remove it ...