Troubleshooting “The following commands are already available on this system”

This is a post in a series of blog articles about troubleshooting typical error situations in PowerShell cmdlets in the cloud. This time it’s about…

Install-Module AzureAD / Install-Module AzureADPreview

Maybe you want to install the AzureAD PowerShell module or the AzureADPreview module. If you get an error message like “The following commands are already available on this system”

Screenshot with a error message of the PowerShell cmdlet Install-Module

This is because you try to install the AzureADPreview Powershell module, but there is already the AzureAD module installed. Or the other way around: You want to install AzureAD, but AzureADPreview is already on the machine.

It’s not possible to install them both, so you have to choose. So if you get this error, you have to uninstall your existing module version first. So please first check what you have installed, and then remove it. After that an installation of the new module is possible without errors:

Get-InstalledModule AzureAD*

Uninstall-Module AzureAD

Install-Module AzureADPreview
Screenshot with the PowerShell cmdlets Uninstall-Module and Install-Module

Leave a Reply

Your email address will not be published. Required fields are marked *