Delete Email

Hello All, I have a need to user Active Roles cmdlets to script the mailbox disablement of DL's and Users. I have the user one but not sure what to use for Groups.

User Mailbox disablement: (This works)

Set-QADUser -Identity $userObj -Proxy -ObjectAttributes @{'edsaDeleteMailbox'=$true}

Group Mailbox disablement (This is not working)

Set-QADGroup -Identity $adObj -Proxy -ObjectAttributes @{'edsaDeleteEmail'=$true}

Anyone have any ideas?

Thanks, Lu

  • Active Directory groups cannot actually be mailbox enabled so your command isn't valid.

    If you are talking about a Shared Mailbox that is effectively "owned" by an AD Group (via permissions), you would have to figure out a way to identify that mailbox and then initiate a disablement of that mailbox itself using the relevant Exchange and/or Exchange Online cmdlets.

    It really depends on how you associate your groups with their respective mailboxes.

    If you can shed some light on that for us, perhaps we can help.

  • Hi Johnny,

    I'm just speaking of Mail enabled Security group on the one that is not working. I was able to get it to work with the following.

    Set-QADGroup -Identity $adObj -Proxy -ObjectAttributes @{'edsaDeleteEmail'='TRUE'}

    Setting the value 'TRUE' works, but when i do $true it does not. 

    The one for a user object it works when I do "Set-QADUser -Identity $userObj -Proxy -ObjectAttributes @{'edsaDeleteMailbox'=$true}".

    Not sure if it's a QAD cmdlet thing. Lu