Skip to content

Instantly share code, notes, and snippets.

@mattmcnabb
Last active May 11, 2017 01:43
Show Gist options
  • Save mattmcnabb/76cb1021748534eb4b4437c739107c34 to your computer and use it in GitHub Desktop.
Save mattmcnabb/76cb1021748534eb4b4437c739107c34 to your computer and use it in GitHub Desktop.
Blog_Office-365-Licensing_2
# save the license options in a variable
$Options = New-MsolLicenseOptions `
-AccountSkuId whitehouse:ENTERPRISEPACK `
-DisabledPlans SWAY, YAMMER_ENTERPRISE, SHAREPOINTWAC, MCOSTANDARD
# set the license using the saved options
Set-MsolUserLicense `
-UserPrincipalName Ronald.Reagan@whitehouse.gov `
-AddLicenses whitehouse:ENTERPRISEPACK `
-LicenseOptions $Options
# save the license options in a variable
$Options = New-MsolLicenseOptions `
-AccountSkuId whitehouse:ENTERPRISEPACK `
-DisabledPlans SWAY, YAMMER_ENTERPRISE, SHAREPOINTWAC, MCOSTANDARD
$Options += New-MsolLicenseOptions `
-AccountSkuId whitehouse:PROJECTONLINE `
-DisabledPlans SWAY
# set Ronnie's licenses using the previously saved options
Set-MsolUserLicense `
-UserPrincipalName Ronald.Reagan@whitehouse.gov
-AddLicenses whitehouse:ENTERPRISEPACK, whitehouse:PROJECTONLINE `
-LicenseOptions $Options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment