Cause 1: Typo in the Account or Group Name (Most Common)
Half the time I see 0XC0000152, someone typed the account name wrong. Maybe you added a space at the end, or you're using a display name instead of the SAM account name. Windows is picky about this.
How to fix it – check the exact name
- Open Command Prompt as Administrator. Click Start, type cmd, right-click it, and pick Run as administrator.
- Type this to see all local groups:
You'll see a list. Write down the exact group name – case doesn't matter, but spaces do.net localgroup - Now check the account name. If it's a local user, type:
If it's a domain account, use:net user
That shows the exact SAM name (like DOMAIN\username).whoami /user - Try adding the account again using the correct names:
After hitting Enter, you should see The command completed successfully. If you get 0XC0000152 again, move to Cause 2.net localgroup "Administrators" "DOMAIN\username" /add
Cause 2: The Account Already Exists as a SID, Not a Name
This one trips up sysadmins all the time. When you remove a domain account from a group and then re-add it, Windows might still hold a stale Security Identifier (SID) reference. The error pops up because Windows sees the SID but not the friendly name.
How to fix it – remove the stale SID
- Open PowerShell as Administrator.
- Check the group's members:
Look for any entry that shows a SID (like S-1-5-21-...) instead of a name like DOMAIN\username.Get-LocalGroupMember -Group "Administrators" - If you see a SID, remove it:
Replace the SID with the exact one you saw. Hit Enter. You'll get a confirmation – type Y if prompted.Remove-LocalGroupMember -Group "Administrators" -Member "S-1-5-21-..." - Now add the account fresh:
If you see no errors, it worked.Add-LocalGroupMember -Group "Administrators" -Member "DOMAIN\username"
Cause 3: Domain Controller Can't Resolve the Account (Domain Environments)
If you're in a domain and the error appears when adding a domain user to a local group, your workstation might not be able to contact the domain controller. This happens often after a password change or if the computer's trust relationship is broken.
How to fix it – test domain connectivity
- Open Command Prompt (not as admin needed for this).
- Run:
Replace yourdomain.com with your actual domain name. You should see a line saying DC: \\DC-Server-Name. If you get an error like ERROR_NO_SUCH_DOMAIN, the computer can't find the domain.nltest /dsgetdc:yourdomain.com - If the DC is reachable, try resetting the computer's machine account password:
This forces a secure channel refresh. Wait 30 seconds, then retry adding the account.nltest /sc_change_pwd:yourdomain.com - If that fails, you might need to rejoin the domain. That's a bigger fix – talk to your domain admin before doing it. But 9 times out of 10, a password reset fixes it.
Quick-Reference Summary Table
| Cause | Symptom | Fix (Command) | Time to Fix |
|---|---|---|---|
| Typo in name | Error on first add attempt | net localgroup "Group" "User" /add |
2 minutes |
| Stale SID in group | Account won't add after removal | Remove-LocalGroupMember then Add-LocalGroupMember |
3 minutes |
| DC not reachable | Error in domain environment | nltest /dsgetdc: then nltest /sc_change_pwd: |
5 minutes |
That's it. Start with the typo check – I'd say 60% of cases end there. If you're still stuck after trying all three, it's worth checking if the account is disabled or locked out in Active Directory. Run net user DOMAIN\username /domain to see the account status. Good luck.