小编Moh*_*rma的帖子

在 power shell 中安装 Az 模块时,出现“PackageManagement\Install-Package:访问云文件被拒绝”错误

我正在尝试通过“Install-Module -Name Az -Scope CurrentUser -Force -Allowclobber command”在 Windows power shell 上安装 Az 模块。但我遇到了以下错误。

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
Run Code Online (Sandbox Code Playgroud)

我搜索并发现一些问题是在我的系统中激活了 onedrive 同步。您能帮我在 powershell 中安装 Az 模块吗?

powershell azure-powershell powershell-az-module

6
推荐指数
1
解决办法
9834
查看次数