0XC0020006

Fix UUID 0XC0020006: The string is invalid error

This error usually means a corrupt or malformed GUID in Windows registry or config. Here's exactly how to find and fix it.

Yeah, that error is a pain. You're staring at "UUID (0XC0020006) - The string is invalid" and wondering what broke. I've seen this on Windows Server 2016/2019 and even Windows 10/11. The good news: it's almost always a corrupt or malformed GUID in the registry or a config file. Let's fix it.

The quick fix: find and correct the bad GUID

First, you need to locate which component is throwing the error. It could be a service, a scheduled task, or even Windows Update. The fastest way is to check the Event Viewer. Look for the source of the error – it'll usually say something like "Task Scheduler" or "Windows Update" or a specific service name.

Once you've identified the culprit, open the registry and search for any GUID values that look wrong. A valid GUID looks like this:

{12345678-1234-1234-1234-123456789012}

An invalid one might have extra characters, missing hyphens, or be truncated. I had a client last month whose print queue died because a third-party print driver wrote a GUID with a comma at the end. Took me two hours to spot it.

For scheduled tasks, the fix is simpler. Open Task Scheduler, find the task that's broken, and either delete it or recreate it. The task's XML file in C:\Windows\System32\Tasks may have a corrupt GUID in it. Just delete the file and the task – it'll rebuild itself on next create.

If it's a service, open services.msc, check the service's path, and look for any GUID in its registry key under HKLM\SYSTEM\CurrentControlSet\Services\. Compare it to what the service expects.

PowerShell to the rescue

When the error is tied to a specific GUID in the registry, you can use PowerShell to validate and fix it. Here's a script that scans a registry path and tests each GUID:

$paths = @(
  'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\TaskManager',
  'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule',
  'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer'
)

foreach ($path in $paths) {
  Get-ChildItem $path -Recurse -ErrorAction SilentlyContinue | ForEach-Object {
    $item = $_
    $item.GetValueNames() | ForEach-Object {
      $val = $item.GetValue($_)
      if ($val -match '^\{?[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\}?$') {
        # Valid GUID – skip
      } elseif ($val -match '^\{?[0-9A-Fa-f-]{10,}\}?$') {
        Write-Host "Possible bad GUID: $val at $($item.Name)"
      }
    }
  }
}

That script won't find everything, but it'll catch the obvious garbage. If you find a bad one, replace it with a valid GUID using PowerShell's New-Guid:

$newGuid = [guid]::NewGuid().ToString()
Set-ItemProperty -Path "HKLM:\SOFTWARE\YourApp" -Name 'GuidValue' -Value $newGuid

Why this happens

The error comes from Windows calling a function that expects a GUID string and getting something it can't parse. Usually it's a corrupt registry entry from a bad uninstall, a power loss during a write, or a third-party app writing garbage. I've also seen it after a failed Windows Update – the update left a partially written GUID in the component store.

Windows is picky about GUID format. If the string has extra spaces, wrong characters, or is too short, you get 0XC0020006. It's not a driver issue, not a hardware issue. It's data corruption in a place Windows doesn't expect.

Less common variations

Sometimes the error isn't in the registry at all. It can show up in:

  • Group Policy settings – Check the registry.pol file. Use gpresult /h report.html to see which policy is failing.
  • COM+ catalog – If the error comes from COM+ or DCOM, open Component Services and look for broken components. Delete and re-register them.
  • Windows Update client – Sometimes a bad update ID in the SoftwareDistribution folder. Stop the wuauserv service, delete the folder, and restart it.
  • Active Directory – On a domain controller, a corrupted GUID in the schema or a trust relationship can trigger this. More rare, but I've seen it.

For the COM+ case, here's a quick re-register command:

cd C:\Windows\System32\inetsrv
appcmd.exe list apps

Then check each app's GUID in the applicationHost.config. If it's wrong, use appcmd set app /app.name:"Default Web Site" /path:"/" to reset it.

When it's a Windows service

If the error mentions a specific service, try re-registering the service with its correct GUID. Services have a ServiceDll and often an EventMessageFile that references a GUID. Use sc qc ServiceName to see the current config, then compare it to the expected value.

Prevention

This error is almost always from corruption, so prevention comes down to good hygiene:

  • Always uninstall software properly – don't just delete folders.
  • Use a UPS to avoid power cuts during writes.
  • Run sfc /scannow and chkdsk /f regularly.
  • Back up your registry before making changes. reg export is your friend.
  • For servers, monitor Event Viewer for disk write errors – that's how corruption starts.

I know that sounds like standard advice, but I've seen the same client get this error three times because they refused to kill a flaky UPS. The fix is always the same: clean up the GUID, and it's gone for a while.

That's it. Find the bad GUID, fix it, move on. If you're still stuck, hit me up in the comments – I've probably seen your exact scenario.

Related Errors in Server & Cloud
0XC00D13ED NS_E_CACHE_ORIGIN_SERVER_NOT_FOUND fix for IIS cache proxy GCP IAM Role Changes Stuck? The 2-Minute Rule and Real Fix 0X0000042E Fix ERROR_SERVICE_START_HANG (0X0000042E) in 5 Minutes VM CPU Contention: Fix Slow VMs on Hyper-V & VMware

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.