I received a couple of responses over in the Office 365 community regarding my questions about the new In-Place Hold option and user mailbox licensing. I also got a confirmation from my Microsoft licensing rep. Once you have placed a user’s mailbox on In-Place Hold, you can completely remove the license.
So, that’s what I’ve been doing. The long hard way.
I wanted to use PowerShell to script the creation of the In-Place Hold. In testing, it worked great. In production… not so much. My plan was to dump the list of terminated users into a CSV file and then feed that into the New-MailboxSearch cmdlet to create the In-Place Hold. The problem with that is that you have to pass the list of mailboxes to the New-MailboxSearch cmdlet as a list of comma separated names.
Side note: Those of you that haven’t learned PowerShell yet need to. Now! You know who you are.
I decided to use a different approach. I used Excel to convert my list of mailbox names from a column to a row and formatted the cells to add the required quotation marks around each name. I then opened the CSV using Notepad++ and just copied the entire list into my PowerShell command. (This worked during testing with just three mailboxes) I pressed enter and fully expected the command to work. No such luck. This time there were too many names.
By this point, I’m starting to get frustrated. Back to Bing and Google.
Bing brought me to a couple of articles that talked about using the Set-MailboxSearch command to add additional mailboxes to an existing In-Place Hold search. Excellent! I changed to this cmdlet and just dropped in a few of the mailbox names. Success! Next I added the next few names. Success again!
Now, I’ve been a system administrator for long enough that I’ve become somewhat pessimistic. I decided to go to the Exchange Control Panel in the Office 365 portal, and see what the In-Place Hold search looked like now that I had added two sets of mailboxes to it. Low and behold… it only had the second group of mailboxes. What?
Well, it appears that running the command the way I was, only overwrote the previous set of mailboxes. Back to square one… and a cup of coffee.
I gave up on scripting this. Really, there’s got to be a good way to do it. Surely I’m just missing something.
I ended up adding over three hundred mailbox names to the In-Place Hold mailbox search by hand.
For those of you that may wonder, the command I was using is below. If anyone would like to comment on where I went wrong, I would be eternally grateful.
Set-MailboxSearch “Terminated-Hold” -SourceMailboxes “username1″,”username2″,”username3” -InPlaceHoldEnabled $true