Logging into the SharePoint Admin Center with PowerShell

This guide explains how to connect to the SharePoint Online Admin Center using PowerShell and the Microsoft.Online.SharePoint.PowerShell module.


Overview

You will go through the following steps:

  1. Install the module
  2. Connect to the Admin Center
  3. Verify the connection
  4. Common issues & tips

1) Requirements

  • You are a SharePoint Administrator or Global Administrator in Microsoft 365.
  • You are using Windows PowerShell 5.1+ or PowerShell 7+.
  • Internet access to install the module.

2) Install the SharePoint Online Management Shell

Install-Module -Name Microsoft.Online.SharePoint.PowerShell -Force

You may be prompted to trust the repository. Type Y and press Enter.

3) Connect to the SharePoint Admin Center

Connect-SPOService -Url "https://<tenant>-admin.sharepoint.com"
  • Replace <tenant> with your own tenant name (e.g., contoso).
  • A sign-in window will appear for authentication.

4) Verify the Connection

To test whether you're connected:

Get-SPOSite

This should return a list of SharePoint sites. If it doesn’t, verify your permissions and tenant name.


🛠️ Common Issues

"Connect-SPOService is not recognized"

  • Make sure the module was installed and imported successfully:
Import-Module Microsoft.Online.SharePoint.PowerShell

"Access denied" or empty result

  • Check if you're using the correct account with admin rights.
  • Confirm that MFA (Multi-Factor Authentication) is supported in your session.

✅ Done!

You’re now connected to SharePoint Online via PowerShell and can begin managing your tenant using available cmdlets.


Powered by Nextra