Navigation

Search

Categories

On this page

Archive

Blogroll

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.



RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 121
This Year: 3
This Month: 0
This Week: 0
Comments: 35

Sign In
Pick a theme:

# Monday, July 21, 2014
Monday, July 21, 2014 7:11:45 PM (GMT Daylight Time, UTC+01:00) ( )

Adding licenses is one of those manual processes you won't want to do manually. PowerShell is really nice for these tasks, but sometimes just getting a script to run is also a challenge.

Recently we found conflicts with a duplicate service (SHAREPOINTENTERPRISE) in the base ENTERPRISEPACK and the new POWER_BI_STANDALONE.

Some error messages (for Google): Set-MsolUserLicense : Unable to update license for this user. The set of licenses includes two or more service plans which cannot be assigned at the same time. Conflicting Service Plans: SHAREPOINTENTERPRISE, SHAREPOINTENTERPRISE.

Since I've already spend some minutes on this Set-MSOLUserLicense, here is our script to license everyone in your team:

Connect-MsolService

$tenant
					= (Get-MsolAccountSku)[0].AccountSkuId.Split(":")[0]
								

$newLicense
					=
					"$tenant`:POWER_BI_STANDALONE"
						

$license
					= New-MsolLicenseOptions -AccountSkuId
					$newLicense
					-DisabledPlans
					SHAREPOINTENTERPRISE
				

 

get-msoluser |
				

    ?{-not
					$_.Licenses.AccountSkuId.Contains("$newLicense")} |
							

    Set-MsolUserLicense -AddLicenses
					$newLicense
					-LicenseOptions
					$license
				

 

#check who is licensed
				

get-msoluser | ?{$_.Licenses.AccountSkuId.Contains("$newLicense")} 

 

#check License usage
				

Get-MsolAccountSku 

 

Special thanks to @motadb for helping me dig this

Comments are closed.