powershellpowershellget

Register-PsRepository : The property 'Name' cannot be found on this object


I'm getting below error when trying to run Register-PsRepository

I have tried:

Any Ideas?

PS C:\> Register-PSRepository -Name MyRepo -SourceLocation  https://MyRepo.com/api/Myrepo   -Credential $c
PackageManagement\Register-PackageSource : The property 'Name' cannot be 
found on this object. Verify that the property exists.
At C:\Program  Files\WindowsPowerShell\Modules\PowerShellGet\1.6.0\PSModule.psm1:4631 char:17

Solution

  • Please check PSRepository configuration xml file:

    %localappdata%\Microsoft\windows\PowerShell\PowerShellGet\PSRepositories.xml

    It's possible that file is corrupt and that could lead to an error you are getting.