Thursday, June 30, 2016

User mailbox converted on Linked Mailbox after migration from Exchange Server 2003

I was doing Exchange Server 2003 migration to Exchange Server 2010 and moved some mailboxes on Exchange 2010 server and after I noticed migrated mailboxes are recipient’s type is “Linked Mailboxes” which is not right, it should be user mailbox.

The reason it is showing as a Linked Mailbox is because the LinkedMasterAcount is set on mailboxes
  • Open Cmdlet
  • To see the LinkedMasterAccount run this command “Get-User -Identity “user” | FL LinkedMasterAccount"
  • Run the following command “Set-User -Identity “user” -LinkedMasterAccount $null” This command will not have any output, but it will set the LinkedMasterAccount to null
  • To verify run the same Get-User command from above. I will be Blank, or should be.

The account will now show as a User Mailbox and not a Linked Mailbox.  If you having bulk users you can use the Import-CSV Cmdlet to use a CSV as Input.

You can also use ADSIEdit with below steps:
  • Run ADSIEdit and find the account to be modified;
  • Clear the msExchMasterAccountSID attribute;
  • Change the msExchRecipientTypeDetails from "2" to "1"

Monday, June 27, 2016

Integrating Lync 2013 with Exchange 2013

As you know Exchange 2013 has two roles. The Front End proxy, and the Back End. The Back End co-locates all roles which are: Mailbox, Client Access, Hub Transport and Unified Messaging.

In Exchange 2010 we configured the IM integration entirely on the server that had the Client Access role. This could be a standalone server all co-located role server depending on the infrastructure needed. This was a config file at Exchange 2010 RTM and later moved to PowerShell and settings on OWA virtual directories with SP1+.

In Exchange 2013 configuration is necessary on both the Front End and Back End roles. In my case both roles installed on single server.

Exchange 2013 Server

  • First of all install is the Microsoft Office Communications Server 2007 R2 Web Service Provider which contains the necessary components to add basic IM and presence features into Outlook Web App.
  • Perform in Powershell use                                                                                                      “Get-OWAVirtualDirectory –identity “Exchange2013FrontEnd\owa (default web site)” |select inst*” to immediately get the necessary information.

  • Use PowerShell command to set the OWA Virtual directory
“Set-OwaVirtualDirectory –identity “\owa (default web site)” –InstantMessagingEnabled $true –InstantMessagingType OCS”

  • If you have more Exchange servers on in your environment, perform the above command against ALL your Exchange 2013 Front End servers.
  • Once this has been set we need to configure certificates. Generate a new Certificate using New-ExchangeCertificate against the internal CA that Lync uses.
Use the following two commands:

$Data = New-ExchangeCertificate –GenerateRequest –SubjectName “CN = Tech-DC-CA, DC = Tech, DC = Com” –DomainName “” –PrivateKeyExportable $true –FriendlyName “Desired Cert Name”


Set-Content –Path “c:\your desired location” –Value $Data

  • Once this is done we need to complete the signing request against your internal certificate authority. Use the same internal CA as what you used for SSL procurement for your Lync platform.

  • We now need to complete the signing request using Import-ExchangeCertificate

 “Import-ExchangeCertificate -FileData ([Byte[]]$(Get-Content -Path ‘c:\cert location’ -Encoding byte -ReadCount 0))

We need to ensure we have done for all Exchanges servers.
  • We are now in a place where all our Exchange 2013 have had the necessary configuration via Powershell and ‘Set-OWAVirtualDirectory’, and we have installed Certificates on all our Exchange 2013. We now need to edit a web config file on each Exchange 2013.

The file we want to modify is the web.config file in the following location “C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Owa”.

  • Open the Web Config file and perform a search for “
”. This takes you to the end of all App Settings configuration. Add these two lines in:

It is important to note that the thumbprint you enter in each web.config file is the thumbprint of the Certificate you have created on each Exchange Servers.

  • Once you have performed this on all Exchange Servers we need to open the Lync Topology Builder and enter each Exchange Servers as a Trusted Application

       Add each Exchange 2013 server separately, matching the FQDN of the server and the certificate published for the Exchange as the Trusted Application. Add all required Exchange 2013 Servers.

  • Once created you can edit them and remove ‘Enable replication of configuration data to this pool’ as this is not needed for Lync IM integration.

  • Once done, publish the Lync topology.
  • We now need to open a Lync Powershell session and perform the following:
New-CsTrustedApplication –ApplicationID “” – TrustedApplicationPoolFqdn “” –Port 5070

  • Perform an iisreset on the Exchange Server where the changes where applied to force and update of the IIS metbase and service.  If this is a live environment then the /noforce option should be added to prevent dropping any active client connections.
Hope this will help, glad to have feedback.

Thank You!

Thursday, June 23, 2016

Cloud-based archive pending

When I provisioned an archive in the cloud for a user with a primary mailbox on-premises, the archive mailbox provisioning status in the Exchange Management Console (EMC) changes to Cloud-based archive pending. After the cloud-based archive's created (in Office 365), the archive status is not automatically updated in EMC. Additionally, Outlook and OWA do not detect and load the archive mailbox.

I have update manually the archive provisioning status in on-premises organization using the ChangeArchiveStatus.ps1script.
  1. Provision an archive mailbox in the cloud using the EMC or the Shell on-premises
  2. Wait for the DirSync cyle to complete (this may take up to 2 hours)
  3. Confirm that the archive has been provisioned in Office 365. This step requires your organization's Office 365 account credentials.
    1. Use the Shell to connect to Office 365.
    2. Run Get-MailUser | fl ArchiveStatus and check if the value of the ArchiveStatus property is set to active.
Using a Shell session to an on-premises Exchange server, run the ChangeArchiveStatus.ps1 script using the following syntax:
ChangeArchiveStatus.ps1 UserName $true

  1. Refresh the EMC and verify that the user's archive status is now active.

Wednesday, June 1, 2016

Lync Contacts lost during user movement one to another pool

Recently we moved the users from one Lync pool to another Lync Pool, during the users movement someone reboot the Lync server, when we checked the users status all the users lost all there contacts.

We tried multiple option but no luck, finally we moved the users back to the old pool with the -force option, contacts should show again. After that we can move to the new pool without the -force option

Solution :

  • Move-CsUser -Identity “user”  -Target “OldFEPool” -Force
  • Once user has moved over and they have their contacts back
  • Move-CsUser -Identity “User”  -Target “NewFEPool”

You have to wait for ~15-20 minute for replication and make sure before move back user must be exit from Lync client.