How to add Skype for Business Online (Plan 2) License, Bulk

Hi,

I was recently tasked to assign the Skype license to our users who already have E3 plans from Microsoft Office 365.

When we first went to Office 365 someone in management decided to un-check the skype for business box until we had a chat policy, now that we have one we would like to add just the Skype for business component of the license to users who already have E3 licenses installed.

Is this possible and can you please point me in the right direction on where to start?

Any help would be greatly appreciated! :slight_smile:

Thanks,

Mike

Hi

I modified my earlier where I needed to remove services from E3 licenses. I haven’t tested this but the idea is same than I had. Verify that the skype service is called MCOSTANDARD. Also clearing variables just to be sure that those are not passing from user to following user.

Following is untested.

$license = 'domain:license'

$users = Get-MsolUser -all | Where {$_.Licenses.AccountSkuID -eq $license} | select -ExpandProperty userPrincipalName

ForEach ($user in $users) {

    $DPs = New-Object System.Collections.Generic.List[String]

        If (((Get-MsolUser -UserPrincipalName $user).Licenses.ServiceStatus | where {$_.ProvisioningStatus -eq 'Disabled'}).ServicePlan.ServiceName -ne $null) {
    
            $DPs.Add(((Get-MsolUser -UserPrincipalName $user).Licenses.ServiceStatus | where {$_.ProvisioningStatus -eq 'Disabled'}).ServicePlan.ServiceName)
                
                #remove skype from disabled
                $DPs.Remove('MCOSTANDARD')

            $LO = New-MsolLicenseOptions -AccountSkuId $license -DisabledPlans $DPs

            Set-MsolUserLicense -UserPrincipalName $user -LicenseOptions $LO
        
                clv user, lo, DPs

        } Else {
        
            #user has no disabled services, do something if you want to do :)
        
        }           

            

}

Jake

Thank you Jake! I’ll will try it and tweak it\learn it if necessary.

Hi

You should probably add one If after $DPs.remove to check if the $DPs is null then you’ll add full E3 license and if it’s not null then give the E3 license with license options, since then there is atleast one service that will remain disabled on that user. Empty license options presumably returns you error.

Also, you might test to add " ((Get-MsolUser -UserPrincipalName $user).Licenses.ServiceStatus | where {$_.ProvisioningStatus -eq ‘Disabled’}).ServicePlan.ServiceName " into variable after $DP = new-object and replace query from If with new variable and also the $DBs.add(varible). This prevents double disabled services query, and saves queries and time to run the script.

Jake