How to use PowerShell to check mailboxes status

  1. Run PoweShell as administrator.
  2. Run Login Office 365 command: $UserCredential = Get-Credential
  3. Run session command: $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
  4. Run import session commnad: Import-PSSession $Session -DisableNameChecking
  5. List the mailboxes status command: get-mailbox

Here are the example:

PS C:\WINDOWS\system32> $UserCredential = Get-Credential
cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:

PS C:\WINDOWS\system32> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

PS C:\WINDOWS\system32> Import-PSSession $Session -DisableNameChecking

ModuleType Version Name ExportedCommands
———- ——- —- —————-
Script 1.0 tmp_rvd1ddlw.lfb {Add-AvailabilityAddressSpace, Add-DistributionGroupMember, Add-MailboxFolderPermission, Add-MailboxLocation…

PS C:\WINDOWS\system32> get-mailbox

Name Alias Database ProhibitSendQuota ExternalDirectoryObjectId
—- —– ——– —————– ————————-
administrator administrator NAMPR07DG132-db078 49.5 GB (53,150,2… 4e7c632d-ea2c-40ba-8628-3eaa3dc63e62

Published by

Bob Lin

Bob Lin, Chicagotech-MVP, MCSE & CNE Data recovery, Windows OS Recovery, Networking, and Computer Troubleshooting on http://www.ChicagoTech.net How to Install and Configure Windows, VMware, Virtualization and Cisco on http://www.HowToNetworking.com