Test-SCDomainCredential
Test-SCDomainCredential
Tests a credential or user name to verify that it authenticates in the domain.
構文
Parameter Set: Credential
Test-SCDomainCredential [-Credential] <VMMCredential> [-VMMServer <ServerConnection> ] [ <CommonParameters>]
Parameter Set: UserName
Test-SCDomainCredential [-UserName] <String> [-VMMServer <ServerConnection> ] [ <CommonParameters>]
詳細説明
The Test-SCDomainCredential cmdlet tests a credential object or user name to verify that it authenticates in the domain.
パラメーター
-Credential<VMMCredential>
Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task.
For more information about the PSCredential object, type Get-Help Get-Credential. For more information about Run As accounts, type Get-Help New-SCRunAsAccount
.
エイリアス |
none |
必須? |
true |
位置は? |
1 |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-UserName<String>
Specifies a the name of a user. Enter a user name with the format Domain\User.
エイリアス |
none |
必須? |
true |
位置は? |
1 |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
-VMMServer<ServerConnection>
Specifies a VMM server object.
エイリアス |
none |
必須? |
false |
位置は? |
named |
既定値 |
none |
パイプライン入力を許可する |
True (ByValue) |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
- Boolean
例
Example 1: Test the validity of a credential object
The first command prompts you for a username and password, creates a PSCredential object, and then stores the object in the $Creds variable.
The second command validates the credential object in $Creds and returns either $True or $False.
PS C:\> $Creds = Get-Credential
PS C:\> Test-SCDomainCredential -Credential $Creds
Example 2: Test the validity of a user name
This command tests the validity of the user name ReneeLo and returns either $True or $False.
PS C:\> Test-SCDomainCredential -UserName "ReneeLo"