IT Guy
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?
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?
Check the event logs on the server, it holds entry for each time the sync process runs.
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.
I would rather be able to type in a PowerShell command to get this info rather than sorting through the event logs.
Have you tried Get-EventLog?
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-eventlog?view=powershell-5.1
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-eventlog?view=powershell-5.1
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.
I included the "out-host -paging" to ease the process as it performs a "page/more" type function. Cheers!
Get-EventLog -LogName Application -Source WinMgmt -Message "*event*" | out-host -paging
I included the "out-host -paging" to ease the process as it performs a "page/more" type function. Cheers!
ASKER
What events in particular should I search for while using the PowerShell command listed above?
You might find these useful
https://blogs.technet.microsoft.com/dkegg/2017/01/12/aad-connect-event-ids/
and for troubleshooting
https://docs.microsoft.com/en-us/azure/active-directory/connect/active-directory-aadconnect-troubleshoot-sync-errors
https://blogs.technet.microsoft.com/dkegg/2017/01/12/aad-connect-event-ids/
and for troubleshooting
https://docs.microsoft.com/en-us/azure/active-directory/connect/active-directory-aadconnect-troubleshoot-sync-errors
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?
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
This is an O365 powershell command
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.