PowerShell Logo Small

Exit-PSHostProcess



This is the built-in help made by Microsoft for the command 'Exit-PSHostProcess', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Closes an interactive session with a local process.

SYNTAX


Exit-PSHostProcess [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


Exit-PSHostProcess closes an interactive session with a local process that you have opened by running the Enter-PSHostProcess cmdlet. You run the Exit-PSHostProcess cmdlet
from within the process, when you are finished debugging or troubleshooting a script that is running within a process.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=403737
Get-Process
Enter-PSHostProcess
Debug-Runspace
Enable-RunspaceDebug
about_Debuggers

REMARKS

<

Examples


Example 1: Exit a process

PS C:\>[Process:1520]: PS C:\> Exit-PSHostProcess
PS C:\>



In this example, you have been working within an active process to debug a script running in a runspace within the process, as described in Enter-PSHostProcess. After you
type the exit command to exit the debugger, run the Exit-PSHostProcess cmdlet to close your interactive session with the process. The cmdlet closes your session in the
process, and returns you to the PS C:\> prompt.