Use it when designing, operating or troubleshooting Windows Automation behavior around User Management. Keep target scope, execution context, operation result, platform read-back and workload acceptance as separate proof boundaries.
User Management · Windows Automation
Windows User Management automates local account and local-group lifecycle while separating account object state, SID identity, group membership, credential handling and effective logon/authorization.
1. Windows user management: local accounts (minimise), AD accounts via AD module.
2. LAPS for local admin.
3. Remove unknown local admins.
4. Automate from source of truth.
5. Audit.
source of truth → automation → accounts
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
identity intent → computer/account SID → local group/account mutation → credential/policy state → fresh token/logon → effective local access
Healthy evidence: SID/account and local groups match intent, credentials are handled safely and fresh-session effective access verifies.
Step 2 Failure modes and next checks Narrow the fault
Suspicious evidence: name collisions, stale tokens or local/domain ambiguity makes membership appear correct while access remains wrong.
Local Windows account/group state does not establish domain IAM, application authorization or UAC elevation for an existing token.
Step 3 Common mistakes Narrow the fault
- Local accounts created on many servers instead of AD.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Account name exists ≠ expected SID identity.
- Group membership written ≠ existing access token updated.
- Administrator group membership ≠ current process elevated.
- Account provisioned ≠ domain/application authorization correct.
Get-LocalUser; Get-LocalGroupMember Administrators— local accountsNew-LocalUser ... -WhatIf— preview- LAPS for local admin — password management
ReferenceWhat it is1 section · depth on demand
Core model
Start from authoritative identity intent, resolve computer and local SID/account/group state, apply membership/account changes, then verify with a fresh token/session where authorization depends on them.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
Windows Automation → User Management owns local Windows account/group lifecycle; Active Directory Automation and IAM remain separate.
In depth
User management automation creates, modifies and disables local and domain accounts consistently — onboarding, offboarding, role changes, password resets — usually driven by HR data or a request workflow.
# Local accounts
New-LocalUser -Name svc_backup -NoPassword -Description 'Backup service'
Add-LocalGroupMember -Group 'Backup Operators' -Member svc_backup
# Domain accounts
New-ADUser -Name 'Anna Hansen' -SamAccountName ahansen -UserPrincipalName ahansen@corp.example.com `
-Path 'OU=Users,OU=Oslo,DC=corp,DC=example,DC=com' -Enabled $true `
-AccountPassword (Read-Host -AsSecureString 'Initial password') -ChangePasswordAtLogon $true
Disable-ADAccount -Identity ahansen
Offboarding should disable rather than delete immediately, remove group memberships, and log every action for audit.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Windows Automation > User Management. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/powershell/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
User Management automation proof-boundary map
Fast scope, execution, platform-state and workload-acceptance boundaries for User Management.
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Scope / identity | Exact source revision, hosts and execution identity are explicit | Selector drift, stale inventory or wrong token changes scope/authority |
| Operation | Tool/provider action and per-host result are traceable | Partial failure, hidden error semantics or environment differences are lost |
| Platform state | Persistent and effective state are read back | Command/cmdlet success is mistaken for convergence |
| Workload proof | Original service/application acceptance passes | Automation summary substitutes for actual runtime behavior |