-
Notifications
You must be signed in to change notification settings - Fork 100
Description
Unable to install Az module for Powershell.
Error messages:
- No repository with the name 'PSGallery' was found.
- Unable to find repository 'PSGallery'. Use Get-PSRepository to see all available repositories.
Register the Microsoft RedHat repository
curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo
Install PowerShell
sudo yum install -y powershell
Start PowerShell
pwsh
#######################
FAILURE STARTS HERE
#######################
https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-6.0.0
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
PS /software/pkg> Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
NuGet provider is required to continue
This version of PowerShellGet requires minimum version '2.8.5.201' of NuGet provider to publish an item to NuGet-based repositories. The NuGet provider must be available in '' or ''. You
can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and import the NuGet provider
now?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): N
Install-Module: NuGet provider is required to interact with NuGet-based repositories. Please ensure that '2.8.5.201' or newer version of NuGet provider is installed.
get-packageprovider
Name Version DynamicOptions
NuGet 3.0.0.1 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
PowerShellGet 2.2.5.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, AllowPrereleaseVersions, Filter, Tag, Incl…
https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-6.0.0
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force