Forum Discussion
License plan disabled options not working in MSOL Powershell
Hey Scott,
I tried your code, and got an error because the $disabledplans options where being treated as cmdlets, and not options - I enclosed them in quotes, and it worked exactly as you'd expect:
$disabled_plans = @()
$disabled_plans += "RMS_S_ENTERPRISE"
$disabled_plans += "SWAY"
$disabled_plans += "YAMMER_ENTERPRISE"
I didn't have the exact same license options as you, I just chose three from my EnterprisePack and disabled them. Have you already tried it with the quotes? It should work just fine.
Mind you, my test user DID already have the EnterprisePack assigned to them (like Vasil pointed out), so if you're assigning new licenses then you'll need to follow his instructions. If you're simply removing extra license components after the fact, your script should do the job.