CmdID / PowerShell / Cmdlets / Exit
Exit-PSHostProcess
Closes an interactive session with a local process. PowerShell reference
From the PowerShell reference
What it does
Closes an interactive session with a local process. The Exit-PSHostProcess cmdlet 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. Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
Exit-PSHostProcess [<CommonParameters>]
Exit a process
PS C:> [Process:1520]: PS C:> Exit-PSHostProcess
PS C:>IdentifyIts page in the reference: Exit-PSHostProcess.