Instal-6ren">
gpt4 book ai didi

macos - "Install-Module -name AzureAD"在装有 MacOSX 的 PS6 上失败并出现错误

转载 作者:行者123 更新时间:2023-12-02 03:32:03 25 4
gpt4 key购买 nike

我能够在 MacOSX 上安装 Powershell Core,现在我尝试从该实例管理 Azure AD 实例。

当我安装 AzureAD 模块时,出现以下错误

PS /Users/c> Install-Module -name AzureAD                                  

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this
repository, change its InstallationPolicy value by running the Set-PSRepository
cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "N"):y
PackageManagement\Install-Package : Unable to load DLL 'api-ms-win-core-sysinfo-l1-1-0.dll': The specified module or one of its dependencies could not be found. (Exception from HRESULT: 0x8007007E) At /usr/local/microsoft/powershell/6.0.2/Modules/PowerShellGet/1.6.0/PSModule.psm1:2057 char:21 + ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : System.DllNotFoundException,Microsoft.PowerShell.Commands.TestModuleManifestCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

我四处寻找在 Mac 上安装 api-ms-win-core-sysinfo 的方法,但由于它是不同的操作系统,我没有看到任何简单的解决方案。

最佳答案

该模块尚未移植到 dotnet core,因此您无法在 Linux\Mac 上使用它。

您可以在这里查看:

https://www.powershellgallery.com/packages/AzureAD/2.0.1.6

此外,您可以使用此搜索来确认我的陈述:

https://www.powershellgallery.com/items?q=Tags%3A%22PSEdition_Core%22++azuread&x=0&y=0

关于macos - "Install-Module -name AzureAD"在装有 MacOSX 的 PS6 上失败并出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51573819/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com