Quantcast
Viewing all articles
Browse latest Browse all 21975

Switching O365 licenses by PowerShell

I've read various posts that say you can lose a user's email by turning off one license and turning on another license for the same user.  I made this PowerShell script and it seemed safe on the few accounts I tried, but is there actually a risk that we might lose a user's existing email here in the 3 second gap?

Import-CsvC:\PowerShell\fac.csv|ForEach{

$Upn=$_.UserPrincipalName

Set-MsolUserLicense-UserPrincipalName$Upn-RemoveLicensesourschool365:STANDARDWOFFPACK_FACULTY

Start-Sleep3

Set-MsolUserLicense-UserPrincipalName$Upn-AddLicensesourschool65:ENTERPRISEPACK_FACULTY

}

Thanks very much!


Ron Proschan


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>