How To Uninstall Azure AD Module In PowerShell

As a PowerShell admin, you must know the quickest way to uninstall the Azure AD module in PowerShell. I have identified some quick approaches. Let us discuss those approaches one by one.

Approach-1 Using the Uninstall-Module command

Follow the below steps.

1. Open the PowerShell ISE with Run as an administrator mode.

uninstall powershell azure ad module

2. You can execute the PowerShell command below.

Uninstall-Module -Name AzureAD

After executing the above command, the AzureAD module was successfully uninstalled, as shown in the screenshot below.

How To Uninstall Azure AD Module In PowerShell

Now cross-check if you will execute the script below. We got the error since the Azure AD module is not available. Check out the screenshot below.

Get-InstalledModule -Name AzureAD -AllVersions
how to uninstall azure ad module

Approach-2 Uninstalling specific version of Azure AD

Follow the below steps.

1. Execute the below PowerShell script to see the installed version of Azure AD.

Get-InstalledModule -Name AzureAD -AllVersions

After executing the PowerShell command, I got the expected output, as shown below.

uninstall azure ad module powershell

2. Now, execute the below PowerShell command to delete the specific version of the Azure AD module.

Uninstall-Module -Name AzureAD -RequiredVersion 2.0.2.182

After executing the above command, I got the expected output below.

uninstall azure ad module

Now cross-check if you will execute the script below. We got the error since the Azure AD module is not available. Check out the screenshot below.

Get-InstalledModule -Name AzureAD -AllVersions
how to uninstall azure ad module

Approach-3: Remove the Azure AD module manually

Follow the below steps.

1. Navigate to C:\Program Files\WindowsPowerShell\Modules path.

2. Delete the AzureAD folder manually.

Video Tutorial

Conclusion

Uninstalling the Azure AD module in PowerShell is so easy, depending on your specific situation. You can successfully remove the module from your system by following the above approaches.

You may also like following the articles below.

Azure Virtual Machine

DOWNLOAD FREE AZURE VIRTUAL MACHINE PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!