Get-MsolGroup command's LastDirSyncTime

mitsu 81 Reputation points
2022-08-19T05:44:57.583+00:00

Out of command support
Get-MsolGroup command's LastDirSyncTime
Please let me know the alternative command.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,475 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 94,366 Reputation points MVP
    2022-08-19T07:00:48.23+00:00

    You can retrieve the onPremisesLastSyncDateTime property via the Graph API/Get-MGGroup cmdlet. For example:

    GET https://graph.microsoft.com/v1.0/groups?$select=id,onPremisesLastSyncDateTime  
    

1 additional answer

Sort by: Most helpful
  1. CarlZhao-MSFT 36,416 Reputation points
    2022-08-19T07:50:42.29+00:00

    Hi @mitsu

    You can use MS Graph PowerShell instead:

    Import-Module Microsoft.Graph.Groups  
      
    Get-MgGroup -Property "id,displayName,onPremisesLastSyncDateTime"   
    

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments