PowerShell: Assign Office 365 license en-mass

Last week I was tasked with the challenge of assigning a sharepoint only license from our Office 365 license pool to a large list of staff.

The following PowerShell script is what I came up with – I added the ability to prompt before assignment, just in case a UPN had slipped through my pre scripting filtering.

This script relies on a CSV file of user principal names, one column – titled UserPrincipalName

Currently, the script assigns a full set of 365 licenses, then removes all but the one the user requires – future plans are to just assign whats required.

Mike Hudson

Mike Hudson is a Lead Cyber Security Analyst living and working in Kingston Upon Hull. With extensive experience in Microsoft and Apple technologies, ranging from desktop OS’s to Server OS’s and hardware. By day working as part of an infrastructure team, and by night ridding the world of IT issues through blog posts..

%d bloggers like this: