Skip navigation
Laptop Keyboard

How to Connect to Office 365 Services with PowerShell

In this post, I will show you to connect to Office 365services including Office 365 tenant, Exchange Online, SharePoint Online, and Skype for Business Online with the help of available PowerShell modules.

Prerequisites

1. Download and install the following PowerShell modules for Office 365, SharePoint Online, and Skype for Business Online on your machine.

  1. Microsoft Online Service Sign-in Assistant for IT Professionals RTW
  2. Windows Azure Active Directory Module for Windows PowerShell (64-bit version)
  3. SharePoint Online Management Shell
  4. Skype for Business Online, Windows PowerShell Module
  5. SharePoint Online Management Shell

2. Work or school account you use to connect to Office 365 should be a member of Global admin role.

3. Microsoft .NET Framework 4.5.x and Windows Management Framework 3.0 or 4.0 should be installed.

Connecting to Office 365

The first step is to create a Windows PowerShell credentials object which will be used in subsequent command while connecting to Office 365.

$credential = Get-Credential

Figure 1 Creating Credential Object

When you are prompted, provide Office 365 work or school account credentials. Click OK when you are done.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish