Product: PowerShell Universal
Version: 5.2.3
I’ve got a new installation of PSU on a server and when it starts I get the following multiple times in the log, as well as each time I try to look at the Repositories tab in the settings
2025-03-04 12:24:28.491 +11:00 [ERR][Universal.Server.Services.ModuleService] Error while searching for module
System.Management.Automation.CommandNotFoundException: The term 'PSResourceRepository' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.Runspaces.Pipeline.Invoke()
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke()
at Universal.Server.Services.ModuleService.GetRepositories() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\ModuleService.cs:line 264
Inside a powershell session, or inside a terminal using environments in PSU, or inside a script I can run Get-PSResourceRepository
and see configured repositories - eg this code in the terminals.ps1 file
$repository = Get-PSResourceRepository -Name "PSGallery"
Write-PSULog -Level Warning "Got Repository:$($repository.name)"
New-PSUTerminal -Name "DTTEST" -Environment "Integrated" -IdleTimeout 0
Logs this in the log
2025-03-04 12:36:07.807 +11:00 [WRN][] Got Repository:PSGallery
Has anyone seen this behavior before or any ideas on what could