PowerShell/PowerShellGet

`Get-PSRepository`: Does not return `InstallationPolicy` property

johlju opened this issue · 0 comments

johlju commented

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Steps to reproduce

When using PowerShellGet the command will return these properties, note InstallationPolicy for example.

PS> Get-PSRepository -Name 'PSGallery' | fl *

Name                      : PSGallery
SourceLocation            : https://www.powershellgallery.com/api/v2
Trusted                   : False
Registered                : True
InstallationPolicy        : Untrusted
PackageManagementProvider : NuGet
PublishLocation           : https://www.powershellgallery.com/api/v2/package/
ScriptSourceLocation      : https://www.powershellgallery.com/api/v2/items/psscript
ScriptPublishLocation     : https://www.powershellgallery.com/api/v2/package/
ProviderOptions           : {}

But when using CompatPowerShellGet it missing a lot of properties that scipts could be expecting, in my case InstallationPolicy.

 Get-PSRepository -Name 'PSGallery' | fl *

Name           : PSGallery
Uri            : https://www.powershellgallery.com/api/v2
Trusted        : False
Priority       : 50
CredentialInfo : 
ApiVersion     : v2

Expected behavior

# To return the same properties as PowerShellGet

Actual behavior

# Does not return the expected property InstallationPolicy.

Error details

# n/a

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.6
PSEdition                      Core
GitCommitId                    7.3.6
OS                             Darwin 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:21:56 PDT 2023; root:xnu-8796.141.3~6/R…
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

0.0.4

Visuals

None.