The most widely known PowerShell hosts are certainly powershell.exe and powershell_ise.exe because they ship out-of-the-box. However, there can be many more (and hidden) PowerShell hosts...
The most widely known PowerShell hosts are certainly powershell.exe and powershell_ise.exe because they ship out-of-the-box. However, there can be many more (and hidden) PowerShell hosts running. Any software that instantiates the PowerShell engine is a PowerShell host. This could be Visual Studio Code (with the PowerShell extension installed), Visual Studio, or any other similar software.
Command to List All Currently Running PowerShell Hosts
To find out all currently running PowerShell hosts, run this:
Get-ChildItem-Path"\\.\pipe\"-Filter'*pshost*'|ForEach-Object {
$id=$_.Name.Split('.')[2]
if ($id-ne$pid)
{
Get-Process-ID$id
}
}