Windows PowerShell command on Get-command Get-PSSessionCapability
MyWebUniversity

Windows PowerShell command on Get-command Get-PSSessionCapability

NAME

Get-PSSessionCapability

SYNOPSIS

Gets the capabilities of a specific user on a constrained session configuration.

SYNTAX

Get-PSSessionCapability [-ConfigurationName] [-Username] [-Full] []

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

Windows PowerShell runspace the specified user would interact with for the specified endpoint. It includes information such as Language Mode, Execution Policy, and Environmental Variables.

PARAMETERS

-ConfigurationName

Specifies the constrained session configuration (endpoint) that you are inspecting. Required? true Position? 0 Default value None Accept pipeline input? False Accept wildcard characters? false

-Full []

Indicates that this cmdlet returns the entire initial session state for the specified user at the specified constrained endpoint. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false

-Username

Specifies the user whose capabilities you are inspecting. Required? true Position? 1 Default value None Accept pipeline input? False Accept wildcard characters? false This cmdlet supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

System.Management.Automation.AliasInfo

System.Management.Automation.FunctionInfo

System.Management.Automation.Runspaces.InitialSessionState

NOTES

Example 1: Get commands available for a user

PS C:\>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

PS C:\>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.

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=821489

New-PSRoleCapabilityFile



Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 OurUNIX.com ™