Identify and remove unauthorized or suspicious user accounts across local systems, Active Directory (AD), and Cloud Identity Providers (Azure AD, AWS IAM, Google Workspace).
Given access to local systems, enterprise identity directories, and cloud tenant management interfaces.
All unauthorized user accounts are identified, removed, and documented across local, enterprise, and cloud environments.
Get-LocalUser
Look for:
cat /etc/passwd
Look for users with UID >= 1000 (normal users).
lastlog
Look for users that have never logged in or have not logged in for long periods.
Get-ADUser -Filter * -Properties LastLogonDate | Select-Object Name, Enabled, LastLogonDate
Look for:
Connect-AzureAD
Get-AzureADUser -All $true | Select-Object DisplayName, UserPrincipalName, AccountEnabled
Look for:
aws iam list-users
aws iam get-user --user-name <username>
Look for:
Operator Note: AWS IAM →
lastUsed
attribute can indicate if dormant.
Admin Console → Directory → Users → Filter by login activity
Look for:
Operator Note: Dormant accounts should be reviewed with account owners.
Operator Note: Accounts created outside of normal onboarding process are HIGH RISK.
Disable-LocalUser -Name "username"
Remove-LocalUser -Name "username"
sudo usermod -L username
sudo userdel username
Disable-ADAccount -Identity "username"
Remove-ADUser -Identity "username"
Set-AzureADUser -ObjectId <UserId> -AccountEnabled $false
Remove-AzureADUser -ObjectId <UserId>
aws iam delete-user --user-name <username>
Operator Note: Suspend (disable) first unless immediate removal is required → preserves data for audit.
Tool | Platform | Installation | Usage |
---|---|---|---|
PowerShell AD Modules | Windows | Built-in / RSAT | AD queries and management |
AWS CLI | Cross-platform | Package manager | IAM management |
AzureAD Module | PowerShell | Install-Module | Azure AD management |
Google Admin Console | Web | N/A | Google Workspace user management |
Date | Version | Description | Author |
---|---|---|---|
2025-05-02 | 1.0 | Created from scratch with deep operator guidance and multi-platform examples | Leo |