我已經成功(據我所知)在我的系統上安裝了 AzureADPreview。但是,當我嘗試執行一個簡單的命令時,它表明未安裝 AzureADPreview。還有人遇到這個嗎?
PS /Users/djacobus> Install-Module -Name AzureADPreview -Force -Verbose
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='AzureADPreview'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'AzureADPreview'.
VERBOSE: Performing the operation "Install-Module" on target "Version '2.0.2.138' of module 'AzureADPreview'".
VERBOSE: The installation scope is specified to be 'CurrentUser'.
VERBOSE: The specified module will be installed in '/Users/djacobus/.local/share/powershell/Modules'.
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'AzureADPreview' with version '2.0.2.138' from the repository 'https://www.powershellgallery.com/api/v2'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='AzureADPreview'' for ''.
VERBOSE: InstallPackage' - name='AzureADPreview', version='2.0.2.138',destination='/tmp/342766576'
VERBOSE: DownloadPackage' - name='AzureADPreview', version='2.0.2.138',destination='/tmp/342766576/AzureADPreview.2.0.2.138/AzureADPreview.2.0.2.138.nupkg', uri='https://www.powershellgallery.com/api/v2/package/AzureADPreview/2.0.2.138'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/AzureADPreview/2.0.2.138'.
VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/AzureADPreview/2.0.2.138'.
VERBOSE: Completed downloading 'AzureADPreview'.
VERBOSE: InstallPackageLocal' - name='AzureADPreview', version='2.0.2.138',destination='/tmp/342766576'
VERBOSE: Validating the 'AzureADPreview' module contents under '/tmp/342766576/AzureADPreview.2.0.2.138' path.
VERBOSE: Test-ModuleManifest successfully validated the module manifest file '/tmp/342766576/AzureADPreview.2.0.2.138'.
VERBOSE: Module 'AzureADPreview' was installed successfully to path '/Users/djacobus/.local/share/powershell/Modules/AzureADPreview/2.0.2.138'.
PS /Users/djacobus> Enable-DCAzureADPIMRole
Enable-DCAzureADPIMRole: The Azure AD Preview PowerShell module is not installed. Please, run 'Install-Module AzureADPreview -Force' as an admin and try again.
我已經嘗試過明顯的卸載、重新安裝、管理員訪問等。
uj5u.com熱心網友回復:
謝謝rwike77。發布您的建議作為幫助其他社區成員的答案。
您可以嘗試卸載/重新安裝AzureAD模塊,然后AzureADPreview使用-allowclobber交換機重新安裝嗎?
UnInstall-Module AzureAD
Install-Module AzureAD
Install-Module AzureADPreview -AllowClobber
您可以參考Install-Module -Name AzureADPreview did not work on Mac,Installing PowerShell on macOS and AzureAD module installed on Mac but connect-AzureAD is notknowledge
uj5u.com熱心網友回復:
我相信我發現了這個問題……很遺憾,它似乎是一個架構問題。我正在運行新的 M1 Macbook。
Import-Module AzureADPreview Import-Module: The current processor architecture is: MSIL. The module '.../AzureADPreview.psd1' requires the following architecture: Amd64
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/390718.html
