Assigning licenses in bulk (O365)

This topic contains 2 replies, has 2 voices, and was last updated by  Jeremy 1 year, 4 months ago.

  • Author
  • #64414


    We have an Office 365 Education Plus for Faculty license assigned to our staff. However when we license users we've left Skype for Business unchecked.

    We've been rolling out Skype for Business to our users and so we'd like to be able to license it in bulk since our user group is in the thousands.

    I've tried creating the two below scripts but both error out in PowerShell (opened Azure AD Module as admin, then connect-msolservice) with a "license is not valid" message.

    I'd appreciate any help to figure out where my scripts are going wrong.

    #Script 1#
    $233fac = New-MsolLicenseOptions –AccountSkuId "ourdomain:STANDARDWOFFPACK_IW_FACULTY"
    $AccountSkuId = "ourdomain:STANDARDWOFFPACK_IW_FACULTY"
    $Users = Import-Csv c:\Temp\SSStafftest.csv
    $Users | ForEach-Object {Set-MsolUser -UserPrincipalName $_.UserPrincipalName
    Set-MsolUserLicense -UserPrincipalName $_.UserPrincipalName -AddLicenses $AccountSkuId -LicenseOptions $233fac}

    #Script 2#
    $AccountSkuId = "ourdomain:STANDARDWOFFPACK_IW_FACULTY"
    $UsageLocation = "US"
    $Users = Import-Csv c:\temp\SSStafftest.csv
    $Users | ForEach-Object {
    Set-MsolUser -UserPrincipalName $_.UserPrincipalName -UsageLocation $UsageLocation
    Set-MsolUserLicense -UserPrincipalName $_.UserPrincipalName -AddLicenses $AccountSkuId

  • #64443


    If you add license to user with license options you need to specify the services that you'll be dropping off, if you'll want to add full license you don't need to use license option.

    There's one topic from couple weeks ago where's my script almost for this. Link:


  • #64471


    Thanks Jarko. Removing the -AddLicenses part of the last line of the 1st script did the trick.

You must be logged in to reply to this topic.