PS Script: Assign license based on WAAD Security Group


A lot of customers buy Package of Plans within Office 365, like Enterprise or MidSize. These Package of License Plans are just build up With the single Plans, but they don’t work the same way when assigning the Licenses With PowerShell.

Therefore I made a PowerShell Script that assigns the License Plans underneath a Package, and I need this because these customers doesn’t want to give away everything inside Office 365 at the same time.

Scenario 1: SharePoint Online isn’t ready yet, but we wanne use Exchange Online, Lync Online or any other service.

Scenario 2: Campaigns. Microsoft regular sells Office 365 License Packs for a discounted price, either on an Agreement or for some deployment reason. But still you might not wanne confuse Your users by enabling all services, which you do by assigning all Licenses within a Package.

Pre reqs:
PowerShell v3
MS Online Services Sign-In Assistant
Security Group With members synchronized to Azure Active Directory

AAD Security Group Name: Lync_Users

The Script:


As of now it only assigns Licenses to users which doesn’t have any License, so this is ment for implementation and New users that should only have Lync Online.

I will later post a script for each Plan within a Enterprise Package, and we can take away the part that collects only unlicensed users if we wanne give the users several Plan Licenses. Also make sure the Script further on uses the $LyncGroup and not $UnlicensedLyncUsers.

A thanks goes out to my friends at for delivering input to my script. Have a look at their script for assigning Licenses for single plans and removing the plans according to Security Group membership.

Leave a Comment