Author Posts

February 16, 2017 at 4:10 pm

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

February 16, 2017 at 5:13 pm

Hi

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: https://powershell.org/forums/topic/how-to-add-skype-for-business-online-plan-2-license-bulk/

Jake

February 16, 2017 at 6:42 pm

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