Get Date A User Is Added To A Group

This topic contains 5 replies, has 4 voices, and was last updated by Profile photo of Ondrej Zilinec Ondrej Zilinec 1 year, 5 months ago.

  • Author
    Posts
  • #28505
    Profile photo of Egan Mike
    Egan Mike
    Participant

    Is there a way, in PowerShell, to get the date when a user account was added to an AD group?

    Thank you,
    Mike

  • #28506
    Profile photo of Don Jones
    Don Jones
    Keymaster

    I don't think this is an attribute in AD, so only if you could scrape it from a log entry.

  • #28507
    Profile photo of Robbie Courtney
    Robbie Courtney
    Participant

    Yes assuming that you have the ActivieDirectory tools installed on your workstation or logged into a Domain Controller the following should work.

    Import-Module activedirectory
    Get-ADUser 'UserName' -Properties * | select whenCreated
    
  • #28508
    Profile photo of Robbie Courtney
    Robbie Courtney
    Participant

    Oops responded too soon, didn't see the part where a user was added to a group...

  • #28509
    Profile photo of Egan Mike
    Egan Mike
    Participant

    That's what I thought. Thanks anyway.

  • #28510
    Profile photo of Ondrej Zilinec
    Ondrej Zilinec
    Participant

You must be logged in to reply to this topic.