Get-PSSessionCapability
Gets the capabilities of a specific user on a constrained session configuration.
구문
Default (기본값)
Get-PSSessionCapability
[-ConfigurationName] <String>
[-Username] <String>
[-Full]
[<CommonParameters>]
Description
The Get-PSSessionCapability
cmdlet gets the capabilities of a specific user on a constrained
session configuration. Use this cmdlet to audit customized session configurations for users.
Starting in Windows PowerShell 5.0, you can use the RoleDefinitions property in a session
configuration (.pssc
) file. Using this property lets you grant users different capabilities on a
single constrained endpoint based on group membership. The Get-PSSessionCapability
cmdlet reduces
complexity when auditing these endpoints by letting you determine the exact capabilities granted to
a user.
By default, the Get-PSSessionCapability
cmdlet returns a list of commands the specified user can
run in the specified endpoint. This is equivalent to the user running Get-Command
in the specified
endpoint. When run with the Full parameter, this cmdlet returns an InitialSessionState
object. This object contains details about the PowerShell runspace the specified user would interact
with for the specified endpoint. It includes information such as Language Mode, Execution Policy,
and Environmental Variables.
예제
Example 1: Get commands available for a user
Get-PSSessionCapability -ConfigurationName Endpoint1 -Username 'CONTOSO\User'
This example returns the commands available to the user CONTOSO\User
when connecting to the
Endpoint1 constrained endpoint on the local computer.
Example 2: Get details about a runspace for a user
Get-PSSessionCapability -ConfigurationName Endpoint1 -Username 'CONTOSO\User' -Full
This example returns details about the runspace the user CONTOSO\User
would interact with when
connecting to the Endpoint1 constrained endpoint.
매개 변수
-ConfigurationName
Specifies the constrained session configuration (endpoint) that you are inspecting.
매개 변수 속성
형식: | String |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | 0 |
필수: | True |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-Full
Indicates that this cmdlet returns the entire initial session state for the specified user at the specified constrained endpoint.
매개 변수 속성
형식: | SwitchParameter |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | Named |
필수: | False |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | False |
나머지 인수의 값: | False |
-Username
Specifies the user whose capabilities you are inspecting.
매개 변수 속성
형식: | String |
Default value: | None |
와일드카드 지원: | False |
DontShow: | False |
매개 변수 집합
(All)
Position: | 1 |
필수: | True |
파이프라인의 값: | False |
속성 이름별 파이프라인의 값: | 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.