In this article

Azure Active Directory Cmdlets

06/02/2016

3 minutes to read

In this article

Applies To: Azure, Office 365, Windows 10, Windows Intune

You can use the Azure Active Directory Module for Windows PowerShell cmdlets for Azure AD administrative tasks such as user management, domain management and for configuring single sign-on. This topic includes information about how to install these cmdlets for use with your directory.

Effective October 20, 2014, the Azure Active Directory Module for Windows PowerShell (32-bit version) is discontinued. Support for the 32-bit version will no longer occur, and future updates to the Azure Active Directory Module will be released only for the 64-bit version. We strongly recommend you install the 64-bit version to ensure future support and compatibility.

If the version number is lower than 1.0.8070.2, remove the existing version and re-install the module using the link in the previous section. Use Add/Remove Programs in Control Panel to remove Azure Active Directory Module for Windows PowerShell, or if you have an older installation, to remove Microsoft Online Services Module for Windows PowerShell. Uninstalling removes both the MSOnline and MSOnlineExtended modules.

The Remove-Module cmdlet removes the MSOnline cmdlets from the session but it does not uninstall the module.

Connect to Azure AD

Click the shortcut to open a Windows PowerShell workspace that has the cmdlets. Alternatively, you can load the cmdlets manually by typing import-module MSOnline at the Windows PowerShell command prompt.

Before you can run any of the cmdlets discussed in this article, you must first connect to your online service. To do so, run the cmdlet connect-msolservice at the Windows PowerShell command prompt. You will then be prompted for your credentials. If you want, you can supply your credentials in advance, for example:

$msolcred = get-credential
connect-msolservice -credential $msolcred

The first command prompts for credentials and stores them as $msolcred. The next command uses those credentials as $msolcred to connect to the service.

For more information about the cmdlets, you can do the following:

To create a folder for help, list the cmdlets, and then open the file in notepad, you can run the following commands at the Windows PowerShell command prompt:

View the examples for a cmdlet, run the following command at the Windows PowerShell command prompt: get-help <cmdlet-name> -examples

View the name, synopsis, description, parameter descriptions, and any examples provided for a cmdlet, run the following command at the Windows PowerShell command prompt: get-help <cmdlet-name> -detailed

View the name, synopsis, description, detailed parameters, and any examples provided for a cmdlet, run the following command at the Windows PowerShell command prompt: get-help <cmdlet-name> -full

Return to Contents

More about Windows PowerShell

Windows PowerShell is a task-based command-line shell and scripting language designed for system administration. Unlike most shells, which accept and return text, Windows PowerShell is built on top of the common language runtime (CLR) and the , and accepts and returns objects. Windows PowerShell introduces the concept of a cmdlet (pronounced "command-let"), a simple, single-function command-line tool built into the shell. Cmdlets have the following naming convention: a verb and noun separated by a dash (-), such as Get-Help, Get-Process, and Start-Service. Windows PowerShell includes more than one hundred basic core cmdlets. For more information about Windows PowerShell, see the Windows PowerShell Getting Started Guide.

Return to Contents

Additional Resources

There are several other places you can get more information and help. These include: