Forum Discussion
License plan disabled options not working in MSOL Powershell
The example you are using will only work when the user laready has the ENTERPRISEPREMIUM SKU assigned, it will not work if you are just assigning a new license. For the latter, you need to also specify the -AddLicense parameter. And if you are using array, you need to add quotes around the service plans to make sure they're recognized as strings.
Lastly, MCOMEETADV can be an actual SKU (license), not a service plan, if purchased outside of the E5. If that's the case, you should not use it with the $disabled_plans variable, but treat it like actual license instead.
- Scott BJul 10, 2017Copper Contributor
Hi Vasil,
Thanks for reply. When I copied/pasted I somehow lost the quotes but my original code has them.
I have also tried the way you suggested by adding the bundle first then applying the disabled options. However that does not work either as the options selected never get disabled. Even If I try disabling just one plan nothing happens.
- Jeremy DahlJul 10, 2017Brass Contributor
Scott, what's your scenario? Are you trying to use this to assign new licenses to unlicensed users, or are you trying to remove license options from people that already have the license pack assigned?
- Scott BJul 10, 2017Copper Contributor
Jeremy,
Thanks for the reply. I think something was hung up on my test user. I tried creating a brand new user and running the powershell script. All looks good now!