System.Exception: Identity 'admin' doesn't exist

Product: PowerShell Universal
Version: 5.6.2

I uninstalled my 4.x test installation, deleted the PowershellUniversal and UniversalAutomation folder. Wanted to start from scratch, but now I am getting the following error when starting the service:

2025-08-11 09:45:57.129 +02:00 [FTL][UniversalAutomation.StartupService] Failed to start PowerShell Universal.
System.Exception: Identity 'admin' doesn't exist.
   at PowerShellUniversal.Authentication.IdentityService.UpdateIdentityAsync(Identity identity) in D:\a\universal\universal\src\PowerShellUniversal.Authentication\IdentityService.cs:line 149
   at UniversalAutomation.StartupService.RunStartup() in D:\a\universal\universal\src\Universal.Server\Services\StartupService.cs:line 512
   at UniversalAutomation.StartupService.TryRunStartup() in D:\a\universal\universal\src\Universal.Server\Services\StartupService.cs:line 277

The webpage just says:

“PowerShell Universal failed to start. Check the logs for more information.”

Can you provide more information about your config?

If you are using SQLLite / a local db,which is contained within C:\ProgramData\UniversalAutomation

and you deleted that entire folder, I wouldnt expect this sort of issue.

However if you are using SQL for example, and you have some existing config, maybe thats why?

Also, when you reinstalled, are you cloning from a git repo or is it a clean install? Do you have code/config predefined in your .universal folder?

I did the following:
Uninstalled PSU 4.x through add/remove

Removed the "%ProgramData%\PowerShellUniversal and the %ProgramData%\UniversalAutomation folder.

Re-installed PSU5.6.2 msi package. Default settings all the way

And got the abovementioned error message.

The appsettings.json consists of all default:

{
  "Kestrel": {
    "Endpoints": {
      "HTTP": {
        "Url": "http://*:5000"
      }
    }
  },
  "Plugins": [
    "SQLite"
  ],
  "Data": {
    "RepositoryPath": "%ProgramData%\\UniversalAutomation\\Repository",
    "ConnectionString": "Data Source=%ProgramData%\\UniversalAutomation\\database.db"
  },
  "Mode": "Server",
  "PSUTelemetry": false
}

This is a local install on a Workstation - not a server - for testing purposes. I did not start any process besides this - like git clone and such.

I have kinda given up getting it to work on my machine. To consistently cleanup after each test, I even made a script to remove folders and uninstall PSU.

Besides the two folders in %ProgramData% - can anything else be the cause for me getting Identity admin doesn’t exist?

Stop-Service -Name PowerShellUniversal

Remove-Item -Path "C:\ProgramData\PowerShellUniversal" -Recurse
Remove-Item -Path "C:\ProgramData\UniversalAutomation" -Recurse

$UninstallString = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -match "Powershell Universal" } | Select-Object -Property DisplayName, UninstallString

Start-Process msiexec -ArgumentList "/qn", "/x $($UninstallString.PSChildName)"