Solved Exchange 2010 Synchronization Service Manager - Automating this with PowerShell
-
So the above is the Synchronization Service Manager for Exchange 2010 (non-hybrid configuration). My goal is to be able to automate the process using Powershell.
As it is now, starting from the bottom of the picture we have to Run each process individually, waiting for each to complete before we can start the next process.
While this isn't horrible, it is a nuisance. Our automated sync window is set to 3 hours, and while just decreasing the window to something like an hour is possible. Apparently Microsoft gets a bit thorny about such a small window occurring constantly.
We'd only be using this on an off schedule "hey we have a new hire and need em to have email ASAP".
So I'm gonna try and configure this in powershell.
-
So I've found this.
Which is summarized as this.
Import-Module ADSync Get-ADSyncScheduler Start-ADSyncSyncCycle -PolicyType Delta
But that doesn't seem right... why would the GUI have 6 processes, and the powershell version only have 3...
-
If anyone has done this before, I'd greatly appreciate your input.
-
Are you using the latest version of AAD sync manager? It pretty much syncs when it notices a change. The old DirSync forced you to sync manually when you wanted to force a change like you described above, but if you ran the powershell command:
cd "C:\Program Files\Windows Azure Active Directory Sync\DirSync" .\importModules.ps1 Start-OnlineCoexistenceSync
it would do all those things with one command.
-
@Mike-Davis I don't have this directory or file name anywhere on our Exchange server.
-
@DustinB3403 It should be on your dir sync server if you're running an old version of Dir Sync.
You are trying to sync your accounts with Azure, correct?
-
@Mike-Davis said in Exchange 2010 Synchronization Service Manager - Automating this with PowerShell:
@DustinB3403 It should be on your dir sync server if you're running an old version of Dir Sync.
You are trying to sync your accounts with Azure, correct?
Correct, but there is no hybrid between our on-premise and Azure.
-
As we create a user account on our On-premise DC, we then have to manually set the SMTP address which pushes the account details to Microsoft to "create" the mailbox.
But before the account syncs with Microsoft we have to run the steps in the OP to sync. (or wait 3 hours).
Which once the user is on Office365, we then can assign a license and they are all set to go.
-
Do you have DirSync / Azure AD Connect running on your exchange server or another server?
-
@Mike-Davis Azure AD Connect is running on our Exchange Server.
-
you don't have any path like C:\Program Files\Windows Azure Active Directory Sync ?
-
@Mike-Davis said in Exchange 2010 Synchronization Service Manager - Automating this with PowerShell:
you don't have any path like C:\Program Files\Windows Azure Active Directory Sync ?
These are the file paths that I have.
Edit: I do have a "Windows Azure Active Directory" folder, but it's empty.
-
That looks like how the newer version is set up. Is it running version 1.1.343.0 or higher?
-
@Mike-Davis said in Exchange 2010 Synchronization Service Manager - Automating this with PowerShell:
That looks like how the newer version is set up. Is it running version 1.1.343.0 or higher?
I'm an idiot.
You mean the sync manager.
It is running 1.1.380.0
-
-
I would upgrade it and see if it doesn't sync automatically after that.
-
@Mike-Davis said in Exchange 2010 Synchronization Service Manager - Automating this with PowerShell:
I would upgrade it and see if it doesn't sync automatically after that.
This is a production system, and we've had a hard enough time getting back to operable.
I'm just trying to simplify my life a bit, by not having to manually run the sync process for any new hires we may have to create.
-
Also isn't this the newest version?
https://www.microsoft.com/en-us/download/details.aspx?id=47594
Edit: which matches what we have installed.
-
So I've found this.
Which is summarized as this.
Import-Module ADSync Get-ADSyncScheduler Start-ADSyncSyncCycle -PolicyType Delta
But that doesn't seem right... why would the GUI have 6 processes, and the powershell version only have 3...
-
haha... well that was in fact the answer.
-
When you fire that power shell script off, if you go back to the sync manager, you'll see it does all 6 things.