Get-PSHostProcessInfo
Gets process information about the PowerShell host.
구문
ProcessNameParameterSet (기본값)
Get-PSHostProcessInfo
[[-Name] <String[]>]
[<CommonParameters>]
ProcessParameterSet
Get-PSHostProcessInfo
[-Process] <Process[]>
[<CommonParameters>]
ProcessIdParameterSet
Get-PSHostProcessInfo
[-Id] <Int32[]>
[<CommonParameters>]
Description
The Get-PSHostProcessInfo
cmdlet gets information about PowerShell host processes running on the
local computer.
Beginning in PowerShell 6.2, this cmdlet is supported on non-Windows platforms.
예제
1: Get a list of PowerShell hosts running on the system
Get-PSHostProcessInfo
ProcessName ProcessId AppDomainName MainWindowTitle
----------- --------- ------------- ---------------
powershell 14676 DefaultAppDomain Windows PowerShell
powershell 5184 DefaultAppDomain Windows PowerShell
2: Get PowerShell host information for a specific process
Get-PSHostProcessInfo -Id 14676
ProcessName ProcessId AppDomainName MainWindowTitle
----------- --------- ------------- ---------------
powershell 14676 DefaultAppDomain Windows PowerShell
매개 변수
-Id
Specifies a process by the process ID. To get a process ID, run the Get-Process
cmdlet.
매개 변수 속성
형식: | Int32[] |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
ProcessIdParameterSet
Position: | 0 |
필수: | True |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-Name
Specifies a process by the process name. To get a process name, run the Get-Process
cmdlet.
매개 변수 속성
형식: | String[] |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
ProcessNameParameterSet
Position: | 0 |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-Process
Specifies a process by the process object. The simplest way to use this parameter is to save the
results of a Get-Process
command that returns process that you want to enter in a variable, and
then specify the variable as the value of this parameter.
매개 변수 속성
형식: | Process[] |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
ProcessParameterSet
Position: | 0 |
필수: | True |
파이프라인의 값: | True |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
입력
Process
You can pipe a Process object from Get-Process
to this cmdlet.