When troubleshooting DirSync issues with Office 365, it is sometimes difficult to know if the DirSync successfully applied to Office 365.
There is a quick way to check this and it provides the data for when the update last took place. First you will need to make sure that you have installed the Azure AD Module for PowerShell, you can download from here.
When this has installed, run Connect-MsolService to connect to the Office 365 tenancy, this should be a global administrator account.
Then run Get-MsolCompanyInformation to get the tenancy information which includes the last dirsync time and last password sync

I use this command. Quick and easy: (Get-MsolCompanyInformation).LastDirSyncTime
Hi,
Is there a way to check the Password has syn status via Powershell?
Hi Mohan,
I don’t believe there is a cmdlet specifically for that.
Thanks,
Tony
Put it in your time zone ($LastDirSyncTime) and give the age ($LastDirSyncAge)
$strCurrentTimeZone = (Get-WmiObject win32_timezone).StandardName
$TZ = [System.TimeZoneInfo]::FindSystemTimeZoneById($strCurrentTimeZone)
$LastDirSyncTime = [System.TimeZoneInfo]::ConvertTimeFromUtc((Get-MsolCompanyInformation).LastDirSyncTime, $TZ)
$LastDirSyncAge = (Get-Date) – $LastDirSyncTime
$LastDirSyncAge.TotalMinutes
Is there any method without msol, which is old
That is a good question. This article was written in 2015 and AAD Connect has changed since then.
It looks like you can do this via a graph call – https://docs.microsoft.com/en-us/graph/api/resources/organization?view=graph-rest-beta checking companyLastDirSyncTime.