+ Post New Thread
Results 1 to 6 of 6
Cloud Services Thread, Proper way to delete a mailbox in O365 hybrid environment in Technical; Hey guys, I'm relatively new to O365 and was wondering how to properly delete a user's mailbox in the cloud. ...
  1. #1

    Join Date
    Mar 2014
    Posts
    3
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Proper way to delete a mailbox in O365 hybrid environment

    Hey guys,
    I'm relatively new to O365 and was wondering how to properly delete a user's mailbox in the cloud. We are in a Hybrid environment so using the Admin Portal to find the user and click the trash-can does not work. I also don't see any options to delete a user's mailbox in the Exchange Management Console either.

    I've seen a few posts saying to remove-mailbox in msol, but my concern is this: We have users who are also licensed for sharepoint and have stuff in OneDrive. If I remove the user completely from MSOL, will it also remove all their sharepoint / OneDrive stuff as well as the mailbox? I'm hoping it's just something I don't know about, like a commandlet after connecting to the cloud or something.


    Thanks in advance!

    P.S. Glad to see there's a forum like this out there!

  2. #2
    the_dude's Avatar
    Join Date
    Nov 2012
    Location
    SoCal
    Posts
    84
    Thank Post
    0
    Thanked 16 Times in 11 Posts
    Rep Power
    6
    It sounds like you want to just remove the mailbox and not the user account? You could unlicense them for exchange.. The reason you can't just delete them in the portal is because you probably have Active Directory Synchronization turned on. With this on, all changes need to be done on-premise in your AD and then synced to the cloud. You could deactivate it (takes a while) and then your powershell command would work. Re-activate when done. The command should just remove the mailbox. MS tech support can help you with this too, just submit a ticket.
    Last edited by the_dude; 21st March 2014 at 05:22 PM.

  3. #3

    Join Date
    Mar 2014
    Posts
    3
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    I tried to do a Disable-mailbox, which seemed to work correctly (It removed the on-prem AD object's exchange attributes), but after DirSyncing and waiting, the mailbox still exists in the cloud (I can see it doing get-mailbox or in the admin portal). Is there something else I have to run to remove it completely from the cloud? I get that using AD DirSync I have to change things locally for them to reflect in the cloud, but the mailbox is just sitting there on the cloud now. I thought it would have gone into a soft-deleted container where I could actually remove it from the cloud, but it doesn't.

    To take it one-step further, I tried to do an enable-mailbox command against the user account here on prem to see if it would override the mailbox in the cloud. Unfortunately, it actually re-connected to the mailbox. I think I'm missing a step here...

  4. #4
    the_dude's Avatar
    Join Date
    Nov 2012
    Location
    SoCal
    Posts
    84
    Thank Post
    0
    Thanked 16 Times in 11 Posts
    Rep Power
    6
    Typically I've also removed the user. Since you are just deleting the mailbox, I think you want to stop dirsync, connect your powershell to the cloud, run the powershell command to delete the mailbox, and restart dirsync. This may bring the box back though. I would open a ticket with MS to be sure....

  5. #5

    Join Date
    Jan 2014
    Posts
    6
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    The correct way (correct me if I'm wrong) is to migrate the mailbox back to on-premise and delete it the usual way.

  6. #6

    Join Date
    Mar 2014
    Posts
    3
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Well, in testing, I was able to successfully remove a test user from MSOL (then the recycle bin), which deleted the test user's email. After running a dirsync which created the test user, and then applying proper licenses, it re-linked the test user's Sharepoint and Onedrive, while creating a new blank mailbox.

    I'm not sure if this is the "proper" way, and I don't know the retention time of the orphaned Sharepoint / OneDrive, but it worked...

SHARE:
+ Post New Thread

Similar Threads

  1. Best way to enable Shadow Copies in a school environment
    By dhicks in forum Windows Server 2008 R2
    Replies: 6
    Last Post: 18th December 2012, 06:49 PM
  2. [SIMS] Any way to delete all items in a SIMS FMS catalogue
    By nLinked in forum MIS Systems
    Replies: 0
    Last Post: 20th June 2012, 08:33 AM
  3. Proper syntax to delete folder from Multiple Profiles
    By soze in forum How do you do....it?
    Replies: 2
    Last Post: 3rd June 2008, 02:54 PM
  4. faster way to delete
    By mac_shinobi in forum Scripts
    Replies: 4
    Last Post: 14th December 2007, 08:51 AM
  5. Easy way to enable dialin access in AD
    By localzuk in forum Windows
    Replies: 5
    Last Post: 26th October 2007, 11:08 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •