Link to home
Start Free TrialLog in
Avatar of IT Guy
IT GuyFlag for United States of America

asked on

Determine last time that AD has synced with Office 365

When I look at the password sync field within the Office 365 web portal it says "Warning. no recent synchronization."

What PowerShell command or other steps can I take to determine the last day and time when password synchronization between Server 2016 Active Directory and Office 365 occurred?
Avatar of Vasil Michev (MVP)
Vasil Michev (MVP)
Flag of Bulgaria image

Check the event logs on the server, it holds entry for each time the sync process runs.
Avatar of IT Guy

ASKER

Can you provide me with a PowerShell command that will display this information?

I would rather be able to type in a PowerShell command to get this info rather than sorting through the event logs.
Avatar of IT Guy

ASKER

What is the exact syntax of the Get-EventLog command that I can use to determine last time that Server 2016 Active Directory has synced with Office 365?
I don't currently have an AD server for testing/comparison.  But you can try this as an example.  The events you are looking for will either fall under the application, security, or system for LogName, if you can force a sync and then check those logs then you'll likely be able to find a good Source and Message string.

Get-EventLog -LogName Application -Source WinMgmt -Message "*event*" | out-host -paging

Open in new window


I included the "out-host -paging" to ease the process as it performs a "page/more" type function.  Cheers!
Avatar of IT Guy

ASKER

What events in particular should I search for while using the PowerShell command listed above?
Avatar of IT Guy

ASKER

These articles are great.

However, does anyone know what the exact PowerShell command or PowerShell script is that will tell me the exact date and time that AD has last synced with Office 365 or with Office 365 Azure?
You should find Get-MsolCompanyInformation has what you are after.

This is an O365 powershell command
ASKER CERTIFIED SOLUTION
Avatar of timgreen7077
timgreen7077

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial