Question:
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.
1 2 3 4 5 6 7 8 9 |
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.
Answer:
I think the reason is PowerShell Gallery is blocked by the firewall. Anyway, try installing it using MSI. It worked for me.