You can disable an Active Directory account using the Disable-ADAccount PowerShell commandlet. To do so, use the -Identity option along with the SAMAccountName of the account to disable. Here, we’ll use the SAMAccountName of CharlesEdge:
Disable-ADAccount -Identity CharlesEdge
The account can then be re-enabled using the Enable-ADAccount commandlet using the same command structure:
Enable-ADAccount -Identity "CharlesEdge"