I am trying to install Az module on windows power shell by "Install-Module -Name Az -Scope CurrentUser -Force -Allowclobber command". But i am getting below error.
PS C:\WINDOWS\system32> Install-Module -Name Az -Scope CurrentUser -Force -Allowclobber
PackageManagement\Install-Package : Access to the cloud file is denied
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:9711 char:34
+ ... talledPackages = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.RemoveItemCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.Instal
lPackage
I searched and found some issue is with onedrive sync activated in my system. Can you please help me on this to install Az module in powershell.
I think the reason is PowerShell Gallery is blocked by the firewall. Anyway, try installing it using MSI. It worked for me.