How to configure Server 2012 R2 for Office 365 Administration - including MFA




One of the first things you will discover as an Office 365 administrator, is that your Admin server will need to be configured to allow easy and streamlined administration through PowerShell. This tutorial includes configuration for Office 365 Administration that supports Modern Authentication (Including 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 pre-requisites specific to Windows Server 2012 R2
- 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 Server 2012 R2 as your Office 365 management server.
You can download the 180 day trial version of Server 2012 R2 here - Link

*** Note - Be very careful if you are configuring a Production server as different versions of .Net may conflict with Production applications and services ***
- More information here - Link

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

If you are not configuring Server 2012 R2 for Office 365 Administration, see the tutorials below
- How to configure your desktop PC for Office 365 Administration - including MFA - Link
- How to configure your desktop PC for Hybrid Exchange - Office 365 - Azure Administration - Link

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

Pre-requisite - .Net Framework 4.5.2
Download and install .NET Framework 4.5.2 - Link
Restart -

Pre-requisite - PowerShell 5.0
Download WMF 5.1 - Link
Select the version of download that matches the OS - 
Install and Restart -

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

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 Server 2012 R2 - Once WMF 5.1 is installed -
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 ***

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' and Exit once completely installed.

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

Install Azure Resource Manager PowerShell Module -
On Server 2012 R2 - Once WMF 5.1 is installed -
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 Modern Authentication (includes support for Multi-Factor Authentication as well as non Multi-Factor Authentication).

As of 22nd July 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

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

No comments:

Post a Comment