Skip to main content
AK - Technology

Main navigation

  • Home
  • Knowledge Base
  • Services
  • Contact

Breadcrumb

  1. Home

Connecting to Office 365 Tenant Using PowerShell

Managing Microsoft 365 often requires deeper visibility than the web admin portals provide. PowerShell gives you that control — but only if the right modules are installed and you connect properly. Here’s a short, practical walkthrough to get you started.

1. Install the Required PowerShell Modules

Exchange Online Management Module
This module lets you manage mailboxes, inbox rules, forwarding, transport settings, and more.

Install-Module ExchangeOnlineManagement

Microsoft Graph PowerShell Module (optional but recommended)
Graph is the modern API for Microsoft 365 and exposes newer features.

Install-Module Microsoft.Graph

2. Connect to Your Office 365 Tenant

Exchange Online
Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline

You’ll be prompted to sign in with your admin credentials.

Microsoft Graph
Connect-MgGraph -Scopes "User.Read.All","Mail.ReadWrite"

Graph requires selecting permissions the first time you connect.

3. You’re Ready to Manage Your Tenant

Once connected, you can run commands such as:
- Listing all mailboxes
- Exporting inbox rules
- Checking forwarding settings
- Auditing configurations across the tenant

PowerShell gives you full administrative reach that the web console doesn’t expose.
 

News

  • Multi‑Factor Authentication Is No Longer Optional
  • Useful Paid Tools
  • Section 2 of Secure Network Act
  • Tecsun Electronics
  • 3 Samsung Galaxy Phones - end of support

ak technology service 
708-717-4645