PowerShell Logo Small

Enable-ADAccount



This is the built-in help made by Microsoft for the command 'Enable-ADAccount', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Enables an Active Directory account.

SYNTAX


Enable-ADAccount [-Identity] <ADAccount> [-AuthType <ADAuthType>] [-Credential <PSCredential>] [-Partition <String>] [-PassThru
[<SwitchParameter>]] [-Server <String>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Enable-ADAccount cmdlet enables an Active Directory user, computer or service account.


The Identity parameter specifies the Active Directory user, computer or service account that you want to enable. You can identify an account
by its distinguished name (DN), GUID, security identifier (SID) or Security Accounts Manager (SAM) account name. You can also set the Identity
parameter to an object variable such as $<localADAccountObject>, or you can pass an account object through the pipeline to the Identity
parameter. For example, you can use the Get-ADUser cmdlet to retrieve an account object and then pass the object through the pipeline to the
Enable-ADAccount cmdlet. Similarly, you can use Get-ADComputer and Search-ADAccount to retrieve account objects.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=219296
Clear-ADAccountExpiration
Disable-ADAccount
Get-ADAccountAuthorizationGroup
Search-ADAccount
Set-ADAccountControl
Set-ADAccountExpiration
Set-ADAccountPassword
Unlock-ADAccount

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

C:\PS>Enable-ADAccount -Identity KimAb



Description

-----------

Enables the account with SamAccountName: KimAb.




-------------------------- EXAMPLE 2 --------------------------

C:\PS>Enable-ADAccount -Identity "CN=Kim Abercrombie,OU=Finance,OU=UserAccounts,DC=FABRIKAM,DC=COM"



Description

-----------

Enables the account with DistinguishedName: "CN=Kim Abercrombie,OU=Finance,OU=UserAccounts,DC=FABRIKAM,DC=COM".




-------------------------- EXAMPLE 3 --------------------------

C:\PS>Get-ADUser -Filter 'Name -like "*"' -SearchBase "OU=Finance,OU=UserAccounts,DC=FABRIKAM,DC=COM" | Enable-ADAccount



Description

-----------

Disables all accounts in the OU: "OU=Finance,OU=UserAccounts,DC=FABRIKAM,DC=COM".