Skip to content

Instantly share code, notes, and snippets.

View Manage Exchange Online Delegated Tenants.ps1
#
# Manage Exchange Online Delegated Tenants.ps1
#
# Setup credentials
$cred = Get-Credential
Connect-MsolService -Credential $cred
# Get list of tenants & loop
Get-MsolPartnerContract -All | ForEach {
@tasgray
tasgray / Manage Office 365 Delegated Admin Tenants.ps1
Last active Nov 20, 2016
Loop through all Office 365 delegated admin tenants
View Manage Office 365 Delegated Admin Tenants.ps1
#
# Managed Office 365 Delegated Admin Tenants.ps1
#
# Basic connection stuff
$cred = Get-Credential
Import-Module MsOnline
Connect-MsolService -Credential $cred
# Get list of tenants & loop