Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Test-PswaAuthorizationRule

Updated: August 15, 2012

Applies To: Windows Server 2012

Test-PswaAuthorizationRule

Verifies whether a rule exists for a specified user, computer, or endpoint.

Syntax

Parameter Set: ComputerName
Test-PswaAuthorizationRule [-UserName] <String> [-ComputerName] <String> [[-ConfigurationName] <String> ] [-Rule <PswaAuthorizationRule[]> ] [ <CommonParameters>]

Parameter Set: ConnectionUri
Test-PswaAuthorizationRule [-UserName] <String> [-ConnectionUri] <Uri> [[-ConfigurationName] <String> ] [-Rule <PswaAuthorizationRule[]> ] [ <CommonParameters>]




Detailed Description

The Test-PswaAuthorizationRule cmdlet verifies whether a rule exists for a specified user, computer, or endpoint. This cmdlet can also be used to test authorization rules to validate that a particular user, computer or endpoint access request is authorized.
By default, this cmdlet evaluates all rules in the authorization file. However, you can specify a subset of rules to test.

You can use this cmdlet to help troubleshoot authentication failures.

The parameters for this cmdlet correspond to fields on the Windows PowerShell® Web Access sign-on page.

Parameters

-ComputerName<String>

Specifies the name of the computer to test.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ConfigurationName<String>

Specifies the name of the Windows PowerShell session configuration, also known as endpoint or runspace, to test.


Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ConnectionUri<Uri>

Specifies the connection URI to test.


Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Rule<PswaAuthorizationRule[]>

Specifies a subset of rules to test. If this parameter is not specified, then this cmdlet tests against all authorization rules.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-UserName<String>

Specifies the name of the user to test.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.Management.PowerShellWebAccess.PswaAuthorizationRule[]

    This cmdlet accepts a PswaAuthorizationRule object as input.


Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Management.PowerShellWebAccess.PswaAuthorizationRule[]

    This cmdlet produces a PswaAuthorizationRule object as output.


Examples

EXAMPLE 1

This example tests all authorization rules in order to display all the rules that allow the user contoso\mhanson to connect to the computer srv2 and use a Windows PowerShell session configuration named test.


PS C:\> Test-PswaAuthorizationRule -ComputerName srv2.contoso.com -UserName contoso\mhanson -ConfigurationName test

EXAMPLE2

This example tests all authorization rules to check which authorization rules apply to the user contoso\mhanson.


PS C:\> Test-PswaAuthorizationRule -UserName contoso\mhanson -ComputerName *

Related topics

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.