Office365 Lizenzen per Powershell auslesen und zuweisen

Als erstes lesen wir die bestehenden Lizenzen aus:

 Get-MsolAccountSku 

Das sieht dann so aus:

Get-MsolAccountSku
AccountSkuId ActiveUnits WarningUnits ConsumedUnits
------------ ----------- ------------ -------------
Tenant:EMSPREMIUM 0 0 0
Tenant:ENTERPRISEPREMIUM 0 0 0
Tenant:WINDOWS_STORE 1000000 0 0
Tenant:ENTERPRISEPACK 3787 0 71
Tenant:FLOW_FREE 10000 0 1
Tenant:MCOPSTN1 0 0 0
Tenant:POWERAPPS_VIRAL 10000 0 1
Tenant:MS_TEAMS_IW 500000 0 0
Tenant:POWER_BI_STANDARD 1000000 0 0
Tenant:EMS 3777 0 70
Tenant:RIGHTSMANAGEMENT_ADHOC 50000 0 0

Hier finden wir eine sauber Darstellung der Lizenzen von Microsoft.

Für Details einer SKU:

(Get-MsolAccountSku| where {$_.AccountSkuId -eq “Tenant:ENTERPRISEPREMIUM “}).ServiceStatus
ServicePlan ProvisioningStatus
----------- ------------------
BPOS_S_TODO_2 Success
FORMS_PLAN_E3 Success
STREAM_O365_E3 Success
Deskless Success
FLOW_O365_P2 Success
POWERAPPS_O365_P2 Success
TEAMS1 Success
PROJECTWORKMANAGEMENT Success
SWAY Success
INTUNE_O365 PendingActivation
YAMMER_ENTERPRISE Success
RMS_S_ENTERPRISE Success
OFFICESUBSCRIPTION Success
MCOSTANDARD Success
SHAREPOINTWAC Success
SHAREPOINTENTERPRISE Success
EXCHANGE_S_ENTERPRISE Success
 

Details of the ENTERPRISEPREMIUM SKU:

(Get-MsolAccountSku| where {$_.AccountSkuId -eq “TENANT:ENTERPRISEPREMIUM“}).ServiceStatus
ServicePlan ProvisioningStatus
----------- ------------------
PAM_ENTERPRISE Success
BPOS_S_TODO_3 Success
FORMS_PLAN_E5 Success
STREAM_O365_E5 Success
THREAT_INTELLIGENCE Disabled
Deskless Success
FLOW_O365_P3 Success
POWERAPPS_O365_P3 Success
TEAMS1 Success
ADALLOM_S_O365 Disabled
EQUIVIO_ANALYTICS Disabled
LOCKBOX_ENTERPRISE Disabled
EXCHANGE_ANALYTICS Disabled
SWAY Success
ATP_ENTERPRISE Disabled
MCOEV Disabled
MCOMEETADV Disabled
BI_AZURE_P2 Success
INTUNE_O365 PendingActivation
PROJECTWORKMANAGEMENT Success
RMS_S_ENTERPRISE Success
YAMMER_ENTERPRISE Success
OFFICESUBSCRIPTION Success
MCOSTANDARD Success
EXCHANGE_S_ENTERPRISE Success
SHAREPOINTENTERPRISE Success
SHAREPOINTWAC Success
 
Get-MsolUser-All | Where {$_.isLicensed -eq “TRUE” -and $_.Licenses.AccountSKUID -eq “TENANT:ENTERPRISEPREMIUM“} | Select Displayname,UserPrincipalName,isLicensed,Licenses

Schreibe einen Kommentar