PowerShell Logo Small

Clear-ADAccountExpiration



This is the built-in help made by Microsoft for the command 'Clear-ADAccountExpiration', 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

Clears the expiration date for an Active Directory account.

SYNTAX


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



Search powershellhelp.space

DESCRIPTION


The Clear-ADAccountExpiration cmdlet clears the expiration date for an Active Directory user or computer account. When you clear the
expiration date for an account, the account does not expire.


The Identity parameter specifies the user or computer account to modify. You can identify a user or group by its distinguished name (DN),
GUID, security identifier (SID), or Security Accounts Manager (SAM) account name. You can also set the Identity parameter to a user or
computer object variable, such as $<localUserObject>, or pass a user or computer object through the pipeline to the Identity parameter. For
example, you can use the Get-ADUser, Get-ADComputer or Search-ADAccount cmdlet to retrieve an object and then pass the object through the
pipeline to the Clear-ADAccountExpiration cmdlet.


For AD LDS environments, the Partition parameter must be specified except in the following two conditions:


-The cmdlet is run from an Active Directory provider drive.


-A default naming context or partition is defined for the AD LDS environment. To specify a default naming context for an AD LDS environment,
set the msDS-defaultNamingContext property of the Active Directory directory service agent (DSA) object (nTDSDSA) for the AD LDS instance.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=219293
Search-ADAccount
Set-ADAccountExpiration
Get-ADUser
Get-ADComputer



REMARKS

<

Examples


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

C:\PS>Clear-ADAccountExpiration -Identity JeffPrice



Description

-----------

Clears the account expiration date for the user with SamAccountName: JeffPrice.




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

C:\PS>Clear-ADAccountExpiration -Identity "CN=JeffPrice,DC=AppNC" -server "FABRIKAM-SVR1:60000"



Description

-----------

Clears the account expiration date for the user with DistinguishedName: "CN=JeffPrice,DC=AppNC" on the AD LDS instance: "FABRIKAM-SVR1:60000".