PowerShellGetv2
PowerShellGetv2 copied to clipboard
Set-PSRepository triggers installation of NUGET with user prompting
Prerequisites
- [X] Write a descriptive title.
- [X] Make sure you are able to repro it on the latest released version
- [X] Search the existing issues.
Steps to reproduce
Set-PSRepository psgallery -InstallationPolicy trusted;
This triggers an installation of NUGET if it is not already installed. The problem is not the installation as such, but that the user is prompted for action. Users don't know anything about what they should do and will phone IT-support and clog the system.
I find it weird that I have to install the packet manager before I have indicated that the repository is trusted.
Expected behavior
Set-PSRepository only deals with trust.
Actual behavior
Set-PSRepository installs NUGET package manager.
Error details
NA
Environment data
Enviroment is Windows Sandbox.
PS C:\Users\WDAGUtilityAccount> Get-Module Microsoft.PowerShell.PSResourceGet; $PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.3031
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.3031
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Visuals
No response