Home > other >  Azure AD - Powershell on OSX
Azure AD - Powershell on OSX

Time:12-23

I have successfully (from what I can tell) installed AzureADPreview on my system. However when I try to execute a simple command it indicates AzureADPreview is NOT installed. Anyone else run into this?

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.

I've tried the obvious uninstall, reinstall, admin access, etc.

CodePudding user response:

Thank you rwike77. Posting your suggestion as an answer to help other community members.

Can you try uninstalling/re-installing AzureAD module and then reinstalling AzureADPreview with -allowclobber switch?

UnInstall-Module AzureAD
Install-Module AzureAD
Install-Module AzureADPreview -AllowClobber

You can refer to Install-Module -Name AzureADPreview did not work on Mac, Installing PowerShell on macOS and AzureAD module installed on Mac but connect-AzureAD is not recognized

CodePudding user response:

I believe I found the issue...sadly it appears it is an architecture issue. I am running the new M1 Macbook.

Import-Module AzureADPreview Import-Module: The current processor architecture is: MSIL. The module '.../AzureADPreview.psd1' requires the following architecture: Amd64

  • Related