Connect to Office 365 PowerShell • • 5 minutes to read • Contributors • • • • • In this article Summary: Connect to your Office 365 organization using Office 365 PowerShell to perform administration tasks from the command line. Office 365 PowerShell lets you manage your Office 365 settings from the command line. Connecting to Office 365 PowerShell is a simple process where you install the required software and then connect to your Office 365 organization. There are two versions of the PowerShell module that you use to connect to Office 365 and administer user accounts, groups, and licenses: • Azure Active Directory PowerShell for Graph (cmdlets include AzureAD in their name) • Microsoft Azure Active Directory Module for Windows PowerShell (cmdlets include MSol in their name) As of the date of this article, the Azure Active Directory PowerShell for Graph module does not completely replace the functionality in the cmdlets of Microsoft Azure Active Directory Module for Windows PowerShell module for user, group, and license administration.
In many cases, you need to use both versions. You can safely install both versions on the same computer. Note Use a 64-bit version of Windows. Support for the 32-bit version the Microsoft Azure Active Directory Module for Windows PowerShell was discontinued in October of 2014.
• These procedures are intended for users who are members of an Office 365 admin role. For more information, see. Connect with the Azure Active Directory PowerShell for Graph module Commands in the module have AzureAD in their cmdlet name.
So your Office 365 subscription is tied to the same account as your Azure subscription. Azure subscriptions are owned by individual users in the directory. Office 365 subscriptions are owned by the directory itself. Users with the right permissions within the directory can manage these subscriptions.
For procedures that require the new cmdlets in the Azure Active Directory PowerShell for Graph module, use these steps to install the module and connect to your Office 365 subscription. Note See for information about the support for different versions of Microsoft Windows. Step 1: Install required software These steps are required once on your computer, not every time you connect. However, you'll likely need to install newer versions of the software periodically. • Open an elevated Windows PowerShell command prompt (run Windows PowerShell as an administrator). • In the Administrator: Windows PowerShell command window, run this command: Install-Module -Name AzureAD If prompted about installing a module from an untrusted repository, type Y and press ENTER. Step 2: Connect to Azure AD for your Office 365 subscription To connect to Azure AD for your Office 365 subscription with an account name and password or with multi-factor authentication (MFA), run one of these commands from a Windows PowerShell command prompt (it does not have to be elevated).
Office 365 cloud Command Office 365 Worldwide (+GCC) Connect-AzureAD Office 365 operated by 21 Vianet Connect-AzureAD -AzureEnvironmentName AzureChinaCloud Office 365 Germany Connect-AzureAD -AzureEnvironmentName AzureGermanyCloud Office 365 U.S. Government DoD and Office 365 U.S. Government GCC High Connect-AzureAD -AzureEnvironmentName AzureUSGovernment In the Sign into your account dialog box, type your Office 365 work or school account user name and password, and then click OK. If you are using MFA, follow the instructions in the additional dialog boxes to provide more authentication information, such as a verification code. After connecting, you can use the new cmdlets for the.
Connect with the Microsoft Azure Active Directory Module for Windows PowerShell Commands in the Microsoft Azure Active Directory Module for Windows PowerShell have Msol in their cmdlet name. Step 1: Install required software These steps are required once on your computer, not every time you connect. However, you'll likely need to install newer versions of the software periodically. Video to avi converter free. • Install the 64-bit version of the Microsoft Online Services Sign-in Assistant:.
• Install the Microsoft Azure Active Directory Module for Windows PowerShell with these steps: • Open an elevated Windows PowerShell command prompt (run Windows PowerShell as an administrator). • Run the Install-Module MSOnline command. • If prompted to install the NuGet provider, type Y and press ENTER. • If prompted to install the module from PSGallery, type Y and press ENTER. Step 2: Connect to Azure AD for your Office 365 subscription To connect to Azure AD for your Office 365 subscription with an account name and password or with multi-factor authentication (MFA), run one of these commands from a Windows PowerShell command prompt (it does not have to be elevated).