Skype

Add Skype for Business Federation Partner/Domain

Hey again!

Have you been searching and looking around to find a way to automate or use PowerShell for adding federation partners to Skype for Business Online?

Then here’s a great example for you, feel free to use the script, edit and tweak it. If you do tweak and edit/improving it. Please go ahead and share it with the community and also link to my blog post.

In my case I’m using PowerShell version 5 together with Skype for Business module, which is a requirement for connecting to the cloud service(s).

The script in itself is pretty much straight forward, type in one or more domains and they get added into the alloweddomains list.
This can be handy if you’re not using open federation and have to add a couple of new domains every now and then..

 


<#
.SYNOPSIS
Filename: Add-CsFedDomain.psm1

Jonas Andersson
Jonas.Andersson@testlabs.se

THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE
ENTIRE RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS
WITH THE USER.

Version 1.0, September 25th, 2016

.DESCRIPTION
Used for adding new domain(s) for Skype for Business Online

.PREREQUISITES
Connect to Skype for Business Online using the PowerShell module

Revision History
--------------------------------------------------------------------------------
1.0     Initial release

.EXAMPLE
Add-CsFederationDomain -domainName domain1.com
Add-CsFederationDomain -domainName domain1.com,domain2.com,domain3.com

#>

function Add-CsFederationDomain (
[Parameter(Mandatory = $true)][array]$domainName
)
{
if ((Get-MsolDomain -ErrorAction 0) -eq $null)
{
Write-Host "Not connected to O365, use ConnectToO365-P*" -ForegroundColor Red
break
}

$tenant = Get-CsTenant
$domainName = $domainName.split(",")
$domainName = $domainName.split(";")
$domainName = $domainName.split(",")
$domainName = $domainName.Replace(" ","")

if ($domainName.Count -lt 2)
{
[string]$domainName = $domainName[0].ToString()
Write-Host "#########################################################################################" -ForegroundColor White
Write-Host "Domain: $domainName" -ForegroundColor DarkGreen

$x = Get-CsTenantFederationConfiguration –Tenant $tenant.TenantId
$domain = $x.AllowedDomains.AllowedDomain | ?{$_.Domain -eq $domainName}
if ($domain -eq $null)
{
$d1 = New-CsEdgeDomainPattern -Domain $domainName
$x.AllowedDomains.AllowedDomain.Add($d1)
Set-CsTenantFederationConfiguration -Tenant $tenant.tenantID  -AllowedDomains $x.AllowedDomains
Write-Host "Domain $domainName was added successfully" -ForegroundColor Green
}
else
{
Write-Host "ERROR: $domainName already in allowed list" -ForegroundColor Red
}
}

if ($domainName.Count -gt 1)
{
foreach ($newdomain in $domainName)
{
Write-Host "#########################################################################################" -ForegroundColor White
Write-Host "Domain: $newdomain" -ForegroundColor DarkGreen

$x = Get-CsTenantFederationConfiguration –Tenant $tenant.TenantId
$domain = $x.AllowedDomains.AllowedDomain | Where-Object {$_.Domain -eq $newdomain}
if ($domain -eq $null)
{
$d1 = New-CsEdgeDomainPattern -Domain $newdomain
$x.AllowedDomains.AllowedDomain.Add($d1)
Set-CsTenantFederationConfiguration -Tenant $tenant.tenantID -AllowedDomains $x.AllowedDomains
Write-Host "Domain $newdomain was added successfully" -ForegroundColor Green
}
else
{
Write-Host "ERROR: $newdomain already in allowed list" -ForegroundColor Red
}
}
}
}

Inspiration from this great blog post:

https://gotspeechguy.com/2012/06/21/setting-up-a-tenants-allowed-domains-for-federation/

#Office15 Wave Whats new

#Office15 Wave Whats new

outlook-2013-icon

I did listen to Microsoft’s announcement for Wave 15
Here are some short directly from the webcast

Office 2013 will integrate directly with Skydrive and Skype, it looks really interesting at Windows 8 and all those really nice integrations if you ask me.

Lync Server 2013 is available for preview download here

Exchange Server 2013 is available for preview download here
Exchange Server 2013 What’s new online help

Exchange 2013 will not support a coexistence between Exchange 2003 and 2013, so all customers that has Exchange 2003 really needs to upgrade.
It does seem like we have really done a totally rebuild of the Exchange architecture.

Keep updated and follow the news on twitter at #MSExchange #ucoms #Lync #Office365
Some blog posts that also have posted new about the upcoming versions:

Exchange:
http://www.pro-exchange.be/blogs/exchange2013/archive/2012/07/16/a-first-look-at-what-s-new-in-exchange-server-2013-and-what-s-still-the-same.aspx
http://paulrobichaux.wordpress.com/2012/07/16/exchange-2013-preview-ships/

Lync:
http://ucken.blogspot.ca/2012/07/whats-new-in-lync-2013.html

 

Be aware, the information above is for the beta products and there might be changes before it’s RTM.

Leave comments of what you think about it