Wait-CsManagementStoreReplicationStatus PowerShell Script

Working in IT, obviously means that I’m an inpatient sort of person. One of the most frustrating moments dealing with Lync is waiting for Central Management Store replication.

The PowerShell cmdlet is Get-CsManagementStoreReplicationStatus or as everybody knows it Get-CsMan<tab><tab>

And then to see if it’s completed, the ritual keyboard banging begins with ‘up’ then ‘enter’… up, enter… up, enter.

In an attempt to save the wear and tear on my keyboard, I’ve written this script.

Script Overview

This Script displays the last update creation time, a progress bar, and shows the number of replicas that are marked as ‘UpToDate’.

How To Use

Just run the script, that’s all you need to do. By default it will wait 10 Minutes before it times out, you can specify  -Timeoutand number of seconds.

Also, by default the script will check every 5 seconds, but you can also specify an  -Interval in seconds too.



Which displays something like this…


Or, if the replicas are not all up to date by the time the specified timeout has elapsed, then you get an error.

The script also returns an exit value of $True if it was successful, or $False if it reached the timeout. So you can use this in other scripts and use the PowerShell variable $LASTEXITCODE to check.


Wait-CsManagementStoreReplicationStatus – Version 1.0

  • Version 1.0 – First release

Unzip and run from a PowerShell prompt.

And obviously – This Script is provided ‘as is’ without warranty of any kind.

The Script

The End

And there you go.. Although it’s probably more trouble downloading this script, copying it to a server, and running it.. By that time Lync has probably replicated anyway.

As always, I welcome any feedback, and it would be nice to hear if you use it.


Tweet about this on TwitterShare on LinkedInShare on Facebook
Pin on PinterestShare on Google+Digg thisShare on RedditShare on StumbleUponEmail this to someone

About Graham Cropley

Working as a Senior Consultant for Skype for Business, Exchange, and Office 365.

Leave a Reply

Your email address will not be published. Required fields are marked *