none
Get list of former employees using outlook who left organisation RRS feed

  • Question

  • I have to get list of former employees from outlook, is there any api where I will search fname.lname@domain.com, will get the user exists or not in company or status as presence unknown or employee left or something meaningful

    Further I have to use the list to delete names form json/yml files, below cmdlet gives me an error that cmdlet is unable to recognize 

    Get-Mailbox -ResultSize unlimited | Get-MailboxPermission -User fname.lname@domain.com |  Ft -a

    Thursday, September 12, 2019 12:48 PM

All replies

  • What cmdlet is unrecognized? Are you running this on an Exchange server? On a client machine that has the Exchange admin tools installed? On a client machine using a remote session to an Exchange server?

    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    Thursday, September 12, 2019 7:17 PM
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,

    Lee


    Just do it.

    Friday, October 4, 2019 8:16 AM
    Moderator
  • Still unable to get success, I don't want to give any name or in case name is given then from Lync I need to check status unknown or presence unknown or from outlook how to get it ? above cmdlet don't give output also not give any error, further want to delete that user from another json
    Saturday, November 16, 2019 9:11 AM
  • In the example you gave, the Get-MailboxPermission will check the current mailbox for the permissions granted to the user "fname.lname@domain.com". If "fname.lname@domain.com" no longer exists in the AD you're going to get either an error or nothing returned.

    If you omit the "-User" parameter you'll get a list of all permissions on the mailbox. I'm pretty sure that any user that no longer exists you'll see a domain SID instead of a name. As you process the list of permissions you will want to eliminate those user names that begin with "NT_AUTHORITY" or the "well know SIDs". You might be able to just use Where-Object and get only the SIDs specific to your domain.

    You might also ask Exchange-related questions in one of the Exchange groups.


    --- Rich Matheisen MCSE&I, Exchange Ex-MVP (16 years)

    • Proposed as answer by jrvModerator Saturday, November 16, 2019 8:30 PM
    Saturday, November 16, 2019 4:00 PM