<

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Configuring Lync Server 2013 to be a partner Application for Exchange 2013

Published on
3,872 Points
772 Views
1 Endorsement
Last Modified:
Ahmed Fouad
I’m an IT professional with around 7 years of experience in Unified Communication, Collaborations and Virtualization technology, during this
I just want to share my experience while configuring Lync server 2013 to be a partner Application for exchange 2013.

As mentioned on https://technet.microsoft.com/en-us/library/jj688151.aspx you need to run Configure-EnterprisePartnerApplication.ps1 script that ships with Exchange 2013. But when I tried to run the script as described on the technet article, I found it always fails with "the accepted domain is not valid". I have checked my accepted domains many times and i found that there's no issues with my configured accepted domain.

So I started to review the script to find the issue and I found that the script was configured as below
$acceptedDomains = Get-AcceptedDomain ;

  if ($acceptedDomains -eq $null)
  {
    WriteError ("There is no accepted domain so user can not be created.")
  }
  
  $acceptedDomain = $acceptedDomains[0].Name;

  if($UseDomainController -eq $true)
  {
    $user = New-MailUser -Name $username -DomainController $DomainController -ExternalEmailAddress $username@$acceptedDomain;
set-mailuser -Identity $user.Identity -HiddenFromAddressListsEnabled $true -DomainController $DomainController
  }
  else
  {
    $user = New-MailUser -Name $username -ExternalEmailAddress $username@$acceptedDomain;

Open in new window


which is totally wrong.

First, it makes $AcceptedDomain variable to equal the Name of the accepted domain. Not all customers configure the name of the Accepted Domain to be the Domain Name.

Second, it makes $AcceptedDomain variable to equal the name of the first Accepted Domain. The first domain may be not the default Accepted Domain.

So I have configured the script as below
$acceptedDomains = Get-AcceptedDomain | ? {$_.Default -eq "True"}  ;

  if ($acceptedDomains -eq $null)
  {
    WriteError ("There is no accepted domain so user can not be created.")
  }
  
  $acceptedDomain = $acceptedDomains.DomainName;

  if($UseDomainController -eq $true)
  {
    $user = New-MailUser -Name $username -DomainController $DomainController -ExternalEmailAddress $username@$acceptedDomain;
set-mailuser -Identity $user.Identity -HiddenFromAddressListsEnabled $true -DomainController $DomainController
  }
  else
  {
    $user = New-MailUser -Name $username -ExternalEmailAddress $username@$acceptedDomain;
set-mailuser -Identity $user.Identity -HiddenFromAddressListsEnabled $true; 
  }

Open in new window

1
Author:Ahmed Fouad
0 Comments

Featured Post

PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month