0X000008AF

Windows Error 0X000008AF: The Group Already Exists — Fixed

Error 0X000008AF means Windows tried to create a group that's already on the machine. Often shows up in MSI installs and scripts. Here's the fast fix.

You're running an installer, a PowerShell script, or a batch file that tries to create a local group. It dies with 0X000008AF and the message The group already exists. Annoying, because the script worked on the last machine you ran it on.

That's the whole problem. The group is already there. Windows isn't broken. Your script is just trying to create something that exists, and the API throws a hard error instead of shrugging it off. I saw this last month on a client's deployment — an old vendor MSI tried to create a local group called SupportUsers on every workstation, and half of them already had it from a previous install attempt. The MSI rolled back and the whole deployment stalled.

Here's the troubleshooting flow. Stop at the first step that fixes it.

Step 1 — The 30-Second Fix: Confirm the Group Exists (and Move On)

Before you do anything else, verify the group is actually there. Open an elevated command prompt and run:

net localgroup

That dumps every local group on the box. If you see the group your installer is complaining about, the error is confirmed: Windows is telling the truth. The group exists.

If it's a domain group instead of a local one, use:

net group /domain

Now the question is whether you care. If the group is supposed to be there and has the right members, the installer's complaint is cosmetic — but most MSIs won't let you ignore it. They fail the whole install. So keep going.

Step 2 — The 5-Minute Fix: Delete and Let the Installer Recreate It

If nothing important lives in the group, nuke it and rerun the installer. This is the right call 90% of the time — the installer wants a fresh group with specific attributes anyway.

net localgroup "YourGroupName" /delete

Then rerun your installer or script. It should sail through.

Two things to watch for:

  • Members you actually need. Before deleting, dump the members: net localgroup "YourGroupName". If real users or service accounts are in there for a reason, save that list. You'll need to re-add them after the installer recreates the group.
  • Built-in groups. Don't delete things like Users, Administrators, Guests, Backup Operators, or anything starting with Hyper-V. Windows will scream at you or let you break your own machine. Only delete groups your installer or script created.

If the delete succeeds and the installer still fails with 0X000008AF, the problem isn't local. Jump to Step 3.

Step 3 — The 15-Minute Fix: Find the Real Source of the Conflict

Sometimes you can't delete the group because it's a domain group, or because the machine is joined to Azure AD and group policy recreates it within seconds, or because the installer is checking both local and domain groups and only one of them is the problem.

This is where the error gets interesting. 0X000008AF is ERROR_GROUP_EXISTS in the Win32 API — decimal 1375. It fires any time a create-group call hits an existing SID or name. That includes:

  • A local group with the same name sitting on the machine
  • A domain group with the same name, if the installer is domain-aware
  • A leftover group from a previous failed install where the cleanup never ran
  • A group with a slightly different name but identical SID, from a machine image cloned without sysprep

That last one is ugly and I've seen it three times. Someone clones a VM, forgets sysprep, and now every clone has the same SIDs. Group creation fails because the SID already exists even though the name is different. If that sounds like your setup, sysprep the image and re-provision. No script tweak will save you.

Check domain vs. local

If the installer runs under a domain account and the target group name exists in AD, use dsquery or just check from an elevated prompt:

net group "YourGroupName" /domain

If that returns a group and you're not supposed to have one in AD, talk to whoever owns your directory. Don't delete domain groups on your own.

Check for duplicate SIDs

Run PsGetSid from Sysinternals against the machine:

psgetsid \\%COMPUTERNAME%

Compare it against another machine in the same fleet. If the SIDs match, that's your problem. Reimage or fix with sysprep /generalize.

Fix the script instead of the machine

If this is your script and you control the code, the real fix is to stop treating 'already exists' as a failure. In PowerShell:

if (-not (Get-LocalGroup -Name "SupportUsers" -ErrorAction SilentlyContinue)) {
    New-LocalGroup -Name "SupportUsers" -Description "Vendor support group"
}

In batch, check first:

net localgroup SupportUsers >nul 2>&1
if errorlevel 1 net localgroup SupportUsers /add

In C/C++ against the Win32 API, you either call NetLocalGroupAdd and swallow ERROR_GROUP_EXISTS (1375), or call NetLocalGroupGetInfo first and skip the add. Neither approach is wrong. What's wrong is letting a duplicate-group condition blow up an install you could have completed.

If it's a vendor MSI you can't edit, wrap the install in a script that pre-creates the group with the exact attributes the MSI expects, or delete and let it recreate. Pre-creating almost always works better — MSIs are usually just checking existence.

What NOT to Do

Skip these. They show up on forums and don't help:

  • Running sfc /scannow. System file corruption has nothing to do with a duplicate group. Waste of 10 minutes.
  • Rebooting 'just in case'. Group membership is stored in the SAM (or AD). Rebooting doesn't change it.
  • Renaming the group. The installer wants the original name back. Renaming just moves the conflict.
  • Editing the registry below HKLM\SAM\SAM\Domains\Account\Aliases. You can't read it without SYSTEM privileges anyway, and if you do get in there, you can corrupt the local account database. Don't.

Quick Reference

SymptomLikely causeFix
Installer fails, group exists locallyPrevious install left it behindDelete group, rerun installer
Group exists in AD, not locallyInstaller is domain-awareCoordinate with directory owner
No group by that name, still failsDuplicate SID from cloned imageSysprep or reimage
Your own script failsNo existence checkAdd Get-LocalGroup or errorlevel guard

Most people hit 0X000008AF once, delete the group, and never see it again. If you're seeing it repeatedly across a fleet, it's a deployment problem, not a Windows problem — clone hygiene, an MSI that doesn't check first, or a GPO that races your installer. Fix the source and the error goes away for good.

Related Errors in Windows Errors
Event ID 7000, 7024, 7038 Service Control Manager Critical Failure: Fix in 5 Minutes 0XC0140021 ACPI 0XC0140021: Power Object Transition Failed Fix 0X40000294 STATUS_WAKE_SYSTEM 0X40000294 — PC Keeps Waking Up From Sleep 0XC01E031C Fix STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE (0xC01E031C)

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.