How to configure your desktop PC for Office 365 Administration - including MFA




One of the first things you will discover as an Office 365 administrator, is that your client PC will need to be configured to allow easy and streamlined administration. This tutorial now includes configuration for Office 365 Administration with Multi-Factor Authentication (MFA). The same configuration is needed to connect with or without MFA.

In this tutorial I will step you through the following.

How to -
- Install the Microsoft Online Services Sign-In Assistant for IT Professionals -
- Install the Azure Active Directory v1.0 PowerShell module
- Install the Azure Active Directory v2.0 PowerShell module
- Install the Exchange Online Remote PowerShell Module
- Install the Windows Azure PowerShell module
- Install the Azure Resource Manager PowerShell module
- Install the SharePoint Online PowerShell module
- Install the Skype for Business Online PowerShell module
- Install the Azure Rights Management PowerShell module

This tutorial will focus on configuring a desktop PC running Windows 10.
You can download the 90 day trial version of Windows 10 here - Link

--------------------------------------------------------------------------------------------------

Once your PC is configured, download my Office 365 Connection script with MFA and follow my tutorial on how to connect to Office 365 with MFA.

TechNet Download - Connection Script for MFA - Downloaded nearly 5,500 times !
Office 365 Connection Script with Modern Auth - Supports MFA (Multi-Factor Auth) - Link

Tutorial -
How to connect to Office 365 via PowerShell with Modern Auth and MFA - Multi-Factor Authentication - Link

More MFA related tutorials and articles at the bottom of this article.

-----------------------------------------------------------------------------------------

PC Configuration Steps -

Install the Microsoft Online Services Sign-In Assistant for IT Professionals RTW -
*** Download Link ***

Once downloaded, run the install file and follow the wizard.













----------------------------------------------------------------------------------------------------

Links to the Azure Active Directory PowerShell Gallery Team - Link

Install the Azure Active Directory v1.0 PowerShell module - (MSOL)
- Install Notes - Link
On Windows 10 -
Open PowerShell or PowerShell ISE with 'Run as Administrator'
Enter the following cmdlet -
Install-Module MSOnline - (The following screenshots are from PowerShell) -









When prompted - type Y (for Yes)

----------------------------------------------------------------------------------------------------

Install the Azure Active Directory PowerShell v2.0 PowerShell module
- Install Notes - Link
On Windows 10 -
Open PowerShell or PowerShell ISE with 'Run as Administrator'
Enter the following cmdlet -
Install-Module -Name AzureAD  - (The following screenshots are from PowerShell) -
When prompted - type Y (for Yes)
When prompted a second time - type Y (for Yes)













The PowerShell package will download and install







----------------------------------------------------------------------------------------------------

Install the Exchange Online Remote PowerShell Module
- Install Notes - Link

*** You MUST use IE to download and install the PowerShell Module ***
- Select IE to run the application (Edge may appear as default if not changed)

Log in to the Office 365 Admin Portal -
Open - Exchange Admin -
- Hybrid - Setup -
Configure - The Exchange Online PowerShell Module supports multi-factor authentication
Click the 'Configure' button and the module will download and install























Once installed, the Exchange Online PowerShell window will load.
It is safe to close this PowerShell window and continue installing the other modules

----------------------------------------------------------------------------------------------------

Install the Windows Azure PowerShell module (Web Platform Installer)
*** Download Link ***
Once downloaded, run the install file and follow the wizard.













Accept the download -


























During installation you will see the progress.


























Click 'Finish' once completely installed.


--------------------------------------------------------------------------------------------

Install Azure Resource Manager PowerShell Module -
On Windows 10 -
Open PowerShell or PowerShell ISE with 'Run as Administrator'
Enter the following cmdlet -
Install-Module AzureRM -allowclobber  - (The following screenshots are from PowerShell) -




When prompted - type Y (for Yes)

The PowerShell package will download and install










---------------------------------------------------------------------------------------------

Install the SharePoint Online module -
Download and install the SharePoint Online module - Link
Follow the GUI based installation

---------------------------------------------------------------------------------------------

Install the Skype for Business Online module -
Download and install the Skype for Business Online module - Link
Follow the GUI based installation























----------------------------------------------------------------------------------------------

Install the Azure Rights Management Administration Tool Link
On Windows 10 -
Open PowerShell or PowerShell ISE with 'Run as Administrator'
Enter the following cmdlet -
Install-Module -Name AADRM - (The following screenshots are from PowerShell) -



When prompted - type Y (for Yes)

The PowerShell package will download and install







***  Reboot your machine to apply the changes ***

--------------------------------------------------------------------------------------------

Congratulations -
Now that all the pre-requisites are installed, you can proceed to administer your Office 365 tenant.
It is important to note that the PowerShell modules that you have downloaded and installed support Multi-Factor Authentication as well as non Multi-Factor Authentication.

As of 7th May 2017, Multi-Factor Authentication is not supported for PowerShell administration of the Security and Compliance Centre.

-----------------------------------------------------------------------------------

Related Tutorials and Connection Scripts
Tutorial -
How to connect to Office 365 via PowerShell with Modern Auth and MFA - Multi-Factor Authentication - Link

TechNet Download - Connection Script for MFA
Office 365 Connection Script with Modern Auth - Supports MFA (Multi-Factor Auth) - Link

All Modern Authentication and MFA (Multi-Factor Authentication) Tutorials
- All my MFA Tutorials on one page - Link
- How to configure your desktop PC for Office 365 Administration - including MFA - Link
- How to configure Server 2012 R2 for Office 365 Administration - including MFA - Link
- How to enable MFA (Multi-Factor Authentication) for Office 365 administrators - Link
- How to connect to Office 365 via PowerShell with MFA - Multi-Factor Authentication - Link
- How to protect your Office 365 MFA admin account from cell phone SIM hijacking - Link
- MFA Support - PowerShell modules and resources for Office 365  - Link

------------------------------------------------------------------------------------


9 comments:

  1. One note that I stumbled across is that you may need to uninstall older modules first. Then install the newer modules. Essentially assume most need to be uninstalled, then re-installed.

    I was having a few problems and worked backwards with rights management first.
    A particular note from MS concerning Azure Rights Management stated that, which then helped me fix the other issues:

    If you had a previous version of the Rights Management administration module installed, use Programs and Features to uninstall Windows Azure AD Rights Management Administration before you install the latest version.

    ReplyDelete
    Replies
    1. Good point jreed.
      This does come under standard PC troubleshooting with apps, but it is something to be aware of.

      Delete
  2. To install the Azure AD module V1 the link isn't working.

    Use this to install it.
    https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-msonlinev1?view=azureadps-1.0
    Install-Module MSOnline

    ReplyDelete
  3. Please help! I am trying to get the Azure AD Powershell module to work on Server 2016 brand new install. I install the online sign in assistance, then install-module MSONline. I see it installs the module 1.1.166.0 however whenever I try to run connect-msolservice I see a quick flash of a logon screen and then this error appears:

    PS C:\support> connect-msolservice
    connect-msolservice : Authentication Error: Unexpected authentication failure.
    At line:1 char:1
    + connect-msolservice
    + ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : OperationStopped: (:) [Connect-MsolService], Exception
    + FullyQualifiedErrorId : System.Exception,Microsoft.Online.Administration.Automation.ConnectMsolService

    ReplyDelete
  4. The link for the AADRM isnt working anymore.

    See here for the new way to install the powershell module.

    https://docs.microsoft.com/en-us/azure/information-protection/deploy-use/install-powershell

    Install-Module -Name AADRM

    ReplyDelete
    Replies
    1. Thanks for this Eric... Much appreciated for bringing this to my attention.
      I will update this post accordingly.

      Delete
    2. Your more then welcome.
      Planning on adding the teams powershell to?

      It is still in beta, but I think it would be a nice addition.
      https://blogs.technet.microsoft.com/skypehybridguy/2017/11/07/microsoft-teams-powershell-support/

      Delete
  5. Have you thought about integrating Microsoft Teams powershell?

    ReplyDelete
    Replies
    1. Not looking at adding the Microsoft Teams support until it leaves beta.
      Latest version at 25 April - https://www.powershellgallery.com/packages/MicrosoftTeams/0.9.3

      Delete