Skip to content

Instantly share code, notes, and snippets.

@panreel
panreel / PPtoE3PP.ps1
Created June 12, 2018 17:04
Change ProPlus/standalone licenses to E3/ProPlus licenses
#Connect to O365 Admin
Connect-MSolService
#Get company name
$accountSkus = Get-MsolAccountSku
$companyName = $accountSkus.AccountSkuId[0].split(":")[0]
$Office365ProPlusSku = $companyName + ":OFFICESUBSCRIPTION"
$Office365E3Sku = $companyName + ":ENTERPRISEPACK"
$Office365E3SkuServicePlansWithoutProPlus = "BPOS_S_TODO_2","FORMS_PLAN_E3","STREAM_O365_E3","Deskless","FLOW_O365_P2","POWERAPPS_O365_P2","TEAMS1","PROJECTWORKMANAGEMENT","SWAY","INTUNE_O365","YAMMER_ENTERPRISE","RMS_S_ENTERPRISE","MCOSTANDARD","SHAREPOINTWAC","SHAREPOINTENTERPRISE","EXCHANGE_S_ENTERPRISE"
#Get all licensed users - You can add more filters Get-MsolUser -All <more filters, e.g. -Department "Sales" -UsageLocation "US"
$x = Get-MsolUser -All | where {$_.isLicensed -eq $true}