<

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

Published on
3,826 Points
726 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
Comment
Author:Ahmed Fouad
0 Comments

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Join & Write a Comment

This video discusses moving either the default database or any database to a new volume.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month