Register-Repository The property 'Name' cannot be found on this object.

Welcome Forums General PowerShell Q&A Register-Repository The property 'Name' cannot be found on this object.

This topic contains 2 replies, has 2 voices, and was last updated by

 
Participant
6 months, 2 weeks ago.

  • Author
    Posts
  • #98026

    Participant
    Points: 0
    Rank: Member

    I've just started to work on setting up an Artifactory powershell module nuget feed (authentication required). I set up a ci user in Artifactory, and was able to successfully add the nuget source & register the repository on our build agents (w2012r2).

    However, when attempting to regsiter the repository on my personal machine (w10) I consistently run into:

    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
    + ...     $null = PackageManagement\Register-PackageSource @PSBoundParamete ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (Microsoft.Power...erPackageSource:RegisterPackageSource) [Register-Pack
       ageSource], Exception
        + FullyQualifiedErrorId : PropertyNotFoundStrict,Microsoft.PowerShell.PackageManagement.Cmdlets.RegisterPackageS
       ource
    

    Attempted command looks like:

    Register-PSRepository -Name "XXXX" -SourceLocation "https://bob/lob/law" -PublishLocation "https://bob/lob/law" -InstallationPolicy Trusted
    

    Some module details with what's installed:
    Powershellget: 1.6.0
    PackageManagement: 1.1.7.0
    Nuget: 4.5.1.4879
    Powershell: 5.1.16299.251

    All the versions above are equal to or newer than what is on the w2012r2 server

    Any help is much appreciated!

  • #98032

    Participant
    Points: 2
    Rank: Member

    Very strange... What are you trying to set as the name? Perhaps it contains unusable characters?

  • #98040

    Participant
    Points: 0
    Rank: Member

    No weird characters at all, actually. In fact, the name I'm using is only letters.

The topic ‘Register-Repository The property 'Name' cannot be found on this object.’ is closed to new replies.