Nothing extremely deep or new here, I just noticed there isn’t any posts out there that lay this out clear and direct for a new Office 365 implementation geared specifically towards Exchange Online and Azure AD. This is good for a new Office 365 customer or admin, after migration to get them set up using Remote PowerShell.
You can also add in other services such as SharePoint or Skype For Business and you can locate those here:
Now, onto the instructions.
Ensure you have the following installed;
- Microsoft Online Service Sign-in Assistant for IT Professionals RTW
- Windows Azure Active Directory Module for Windows PowerShell (64-bit version)
Start by checking if you have a PowerShell profile enabled or not (Skip past this portion if you know that you do)
Open PowerShell as Administrator and type the following:
If the value is false, type the following:
New-item –type file –force $profile
Now, open your PowerShell profile:
Once the profile is open, paste in the following commands to Add-In connectivity to Office 365 PowerShell and Exchange Online PowerShell:
$credential = Get-Credential
Connect-MsolService -Credential $credential
$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri “https://outlook.office365.com/powershell-liveid/” -Credential $credential -Authentication “Basic” -AllowRedirection
Import-PSSession $exchangeSession -DisableNameChecking
Now just SAVE this file, ensure PowerShell is closed and then reopen PowerShell.
Now you should have a prompt for credentials when you open PowerShell to connect to Exchange Online and Office 365. Enter the credentials and wait a few seconds while PowerShell loads the appropriate modules.