Users & Groups
Cheat sheet · https://pcornel.dk/topic.php?topic=2978
Answer
Users & Groups explains the Windows security-principal model behind sign-in and access decisions. A user account has an identity such as a SID; group membership expands the SIDs and privileges carried in an access token; a user profile stores per-user state but is not the account itself.
Remember
- Windows authorizes security principals by SID, not by the display name alone.
- Local and domain accounts can have the same username while remaining completely different principals.
- Group membership affects the access token; changing membership may require a new sign-in or new token before a running process sees the change.
- A user profile is per-user runtime/configuration state and can fail independently of the account.
- Administrator-group membership does not mean every process is elevated; UAC is a separate boundary.
First checks
Get-LocalUser— local accountsGet-LocalGroupMember Administrators— local adminswhoami /all— current user, SID, groups, privilegesnet user <user> /domain— domain account details
Commands
net user- Displays or manages Windows user accounts. With no username it lists local accounts; with a username it displays accoun…
net localgroup- Displays or manages local Windows groups and their membership. It is useful for proving configured local group membersh…
Verify in this order
account (local SAM or AD) → authentication → token with SIDs → access
Where it usually breaks
First mismatch in target identity/version → persistent configuration/source of truth → provider/service/control plane → runtime/effective state → user/workload-visible result → event/log evidence; preserve identity/native error/pre-state before mutation.
Windows identity boundary map
| Item | Meaning | Boundary |
|---|---|---|
| Local account | Local machine SAM / local account database | machine-scoped SID; usable without domain connectivity |
| Microsoft account | Cloud identity linked to Windows sign-in | Windows creates/uses a local security context and profile for the sign-in |
| Domain account | Active Directory domain | domain SID plus RID; domain authentication/policy applies |
| Group | Collection of security principals | group SID can be present in token and grant/deny access |
| User profile | Per-user files and registry state | not the identity itself; can be corrupt while the account is valid |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2978