Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (22 sloc) 1.17 KB
This script connects to the Skype for Business admin shell, specifying the admin domain to connect to.
The script prompts for credentials, and then connects to the MSOL Service in order to locate the root tenant domain. This domain is then used
to specify the OverrideAdminDomain parameter.
File Name : Connect-SFB-Online.ps1
Author : Jeremy Dahl (
Copyright 2017 - Master & Cmd-R
Simply run this script by calling .\Connect-SFB-Online in PowerShell
$credential = Get-Credential
Connect-MsolService -Credential $credential
# Find the root ( tenant domain
Write-Host "Connected to MS Online Services, checking admin domain..." -ForegroundColor Yellow
$msolDomain = Get-MsolDomain | where {$_.Name -match "" -and $_.Name -notmatch ""}
Write-Host "Admin domain found, connecting to $($msolDomain.Name)" -ForegroundColor Green
# Use this domain to connect to SFB Admin domain
$session = New-CsOnlineSession -Credential $credential -OverrideAdminDomain $msolDomain.Name
Import-PSSession $session