Ran*_*Dom 2 macos azure azure-powershell azure-active-directory powershell-core
我能够在 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
Run Code Online (Sandbox Code Playgroud)
我四处寻找在 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