New Script – LicenseAndHold.ps1 – License/Delicense users in batches and place on hold

PowerShell logo

My new script has been added to the Technet Gallery for use in migration scenarios moving to Exchange Online where you want to create mailboxes for batches of users, place the new mailboxes on hold immediately, and then remove the mailboxes all in batches.

I have a lot of projects coming up where I need to move inactive mailboxes to Exchange Online, place them on hold, and then delicense them to free up the licenses for the active mailboxes.

I wrote this script to make this a little easier. It licenses the users in a single column CSV file (with the column name UPN) with whichever license you specify using the -LicenseSku switch.

If you have specified a supporting SKU, such as ENTERPRISEPACK you can use the -Hold switch to apply litigation hold to the newly created mailbox.

You can also then use the -Disable switch to remove the specified license from the users in your CSV file.

You can download the script here https://gallery.technet.microsoft.com/LicenseAndHoldps1-4431f0e0

If you have any questions, comments or suggestions please either leave a comment below, Tweet me @MikeParker365 or email me at blog@mikeparker365.co.uk.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s