Get-PSHostProcessInfo
取得 PowerShell 主機的處理程序資訊。
PowerShell
Get-PSHostProcessInfo
[[-Name] <String[]>]
[<CommonParameters>]
PowerShell
Get-PSHostProcessInfo
[-Process] <Process[]>
[<CommonParameters>]
PowerShell
Get-PSHostProcessInfo
[-Id] <Int32[]>
[<CommonParameters>]
Get-PSHostProcessInfo
Cmdlet 會取得本機計算機上執行之 PowerShell 主機進程的相關信息。
從 PowerShell 6.2 開始,非 Windows 平台上支援此 Cmdlet。
PowerShell
Get-PSHostProcessInfo
ProcessName ProcessId AppDomainName MainWindowTitle
----------- --------- ------------- ---------------
powershell 14676 DefaultAppDomain Windows PowerShell
powershell 5184 DefaultAppDomain Windows PowerShell
PowerShell
Get-PSHostProcessInfo -Id 14676
ProcessName ProcessId AppDomainName MainWindowTitle
----------- --------- ------------- ---------------
powershell 14676 DefaultAppDomain Windows PowerShell
依進程識別子指定進程。 若要取得進程標識碼,請執行 Get-Process
Cmdlet。
類型: | Int32[] |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
依行程名稱指定進程。 若要取得進程名稱,請執行 Get-Process
Cmdlet。
類型: | String[] |
Position: | 0 |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
指定進程對象的進程。 使用此參數最簡單的方式是儲存 Get-Process
命令的結果,該命令會傳回您想要在變數中輸入的進程,然後將變數指定為此參數的值。
類型: | Process[] |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
您可以使用管線將 Process 物件從 Get-Process
傳送至此 Cmdlet。