The PSModuleRepositoryResource is great to set repositories but you need to specify Name and SourceLocation. This is great to add new repositories but if you just want to set an existing repository to trusted it's overkill to specify again the source (example : PSGallery).
The underlying command should be Set-PSRepository -Name $name -InstallationPolicy $true/$false no need to add the sourcelocation
Hello,
The PSModuleRepositoryResource is great to set repositories but you need to specify Name and SourceLocation. This is great to add new repositories but if you just want to set an existing repository to trusted it's overkill to specify again the source (example : PSGallery). The underlying command should be Set-PSRepository -Name $name -InstallationPolicy $true/$false no need to add the sourcelocation