Unlock-QADUser
From PowerGUI Wiki
Unlock a user account in Active Directory. Supported are both Active Directory Domain Services (AD DS) and Active Directory Lightweight Directory Services (AD LDS).
Contents |
Syntax
Unlock-QADUser [[-Identity] <IdentityParameter>] [-Proxy] [-Service <String>] [-ConnectionAccount <String>] [-ConnectionPassword <SecureString>] [-Credential <PSCredential>] [-Connection <ArsConnection>] [-UseGlobalCatalog] [-WhatIf] [-Confirm] [<CommonParameters>]
Detailed Description
Use this cmdlet to unlock a user account that has been locked out due to a number of failed logon attempts. You can unlock user accounts in both Active Directory Domain Services (AD DS) and Active Directory Lightweight Directory Services (AD LDS).
The cmdlet has optional parameters that determine the server and the security context for the operation. Normally, the connection parameters could be omitted so far as a connection to a server is established prior to using the cmdlet. In this case, the server and the security context are determined by the Connect-QADService cmdlet.
If you do not use Connect-QADService and have no connection established prior to using a cmdlet, then the connection settings, including the server and the security context, are determined by the connection parameters of the first cmdlet you use. Subsequent cmdlets will use those settings by default.
Related Commands
Parameters
| Name | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|
| Identity | Specify the DN, SID, GUID, UPN or Domain\Name of the user account you want to unlock.
This parameter is optional since you can pipe into this cmdlet the object returned by the Get-QADUser cmdlet, to have that object identify the user account to act upon. | false | true (ByValue) | |
| Proxy | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| Service | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| ConnectionAccount | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| ConnectionPassword | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| Credential | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| Connection | For parameter description, see help on the Connect-QADService cmdlet. | false | true (ByValue) | |
| UseGlobalCatalog | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| WhatIf | Describes what would happen if you executed the command, without actually executing the command. | false | false | |
| Confirm | Prompts you for confirmation before executing the command. | false | false |
Examples
Example 1
unlock-QADUser 'MyDomain\JSmith'
Connect to any available domain controller with the credentials of the locally logged on user and unlock the user account identified by Domain\Name.
Example 2
unlock-QADUser '<DN of user account>' -Service 'server.domain.local:389'
Connect to the AD LDS instance on 'server.domain.local:389' with the credentials of the locally logged on user, and unlock the AD LDS user account that is identified by DN.
