RAI3602_0001: Block domain user account via Powershell
Summary
| ID | RAI3602_0001 |
|---|---|
| Brief Description | Block user accounts using the Disable-ADAccount cmdlet |
| Author | @SEC |
| Creation Date | 2023/05/18 |
| Modification Date | 2023/05/18 |
| Requirements |
|
| Tags |
|
| References | |
| Means of action |
|
| Targets of action |
|
| Linked Response Actions |
Description
You can easily disable user accounts using the Disable-ADAccount cmdlet. Use the -Identity parameter
to specify which account to disable; you can supply its distinguished name, security identifier (SID),
globally unique identifier (GUID) or Security Account Manager (SAM) account name:
Disable-ADAccount -Identity <DOMAIN_USER>
Verify that everything was successful by requesting accounts information:
Search-ADAccount -AccountDisabled | Select-Object Name, SamAccountName