Test-PswaAuthorizationRule

Test-PswaAuthorizationRule

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

구문

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

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

자세한 설명

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.

매개 변수

-ComputerName<String>

Specifies the name of the computer to test.

별칭

없음

필수 여부

true

위치

2

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ConfigurationName<String>

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

별칭

없음

필수 여부

false

위치

3

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-ConnectionUri<Uri>

Specifies the connection URI to test.

별칭

없음

필수 여부

true

위치

2

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Credential<PSCredential>

Specifies a PSCredential object for a user account that you want to use to test Windows PowerShell 웹 액세스 authorization rules. If you do not add this parameter, the cmdlet uses the currently logged-on user account. To get a PSCredential object, which is required to test authorization rules remotely, run the Get-Credential cmdlet.

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Rule<PswaAuthorizationRule[]>

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

별칭

없음

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-UserName<String>

Specifies the name of the user to test.

별칭

없음

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

  • Microsoft.Management.PowerShellWebAccess.PswaAuthorizationRule[]

    This cmdlet accepts a PswaAuthorizationRule object as input.

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • Microsoft.Management.PowerShellWebAccess.PswaAuthorizationRule[]

    This cmdlet produces a PswaAuthorizationRule object as output.

예제

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

EXAMPLE 2

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 *

관련 항목

Add-PswaAuthorizationRule

Get-PswaAuthorizationRule

Remove-PswaAuthorizationRule

Install-PswaWebApplication

Get-Credential