使用powershell批量分配指定许可

以管理员身份运行AAD PSide

image

查看订阅和使用状态ui

Get-MsolAccountSku命令行

clip_image001

批量授予全部用户E3许可3d

Get-MsolUser -All -UnlicensedUsersOnly | Set-MsolUserLicense -AddLicenses "qwew:ENTERPRISEPACK_NO_RMS"blog

clip_image005

查看某个用户已经分配的许可seo

(Get-MsolUser -UserPrincipalName lili@qwew.partner.onm51CTO提醒您,请勿滥发广告!).licenses.servicestatusip

image

定义新的许可变量,除了Exchange 产品,其余的产品都禁用ci

$LicenseOptions1 = New-MsolLicenseOptions -AccountSkuId qwew:ENTERPRISEPACK_NO_RMS -DisabledPlans SHAREPOINTWAC,SHAREPOINTENTERPRISE,OFFICESUBSCRIPTION,MCOSTANDARDget

image

执行命令,使定义新的许可变量生效(标记部分换成本身的AccountSkuId)产品

Get-MsolUser -all | where {($_.islicensed -eq $true) -and ($_.licenses.accountskuid -eq 'qwew:ENTERPRISEPACK_NO_RMS')} | Set-MsolUserLicense -LicenseOptions $licenseoptions1

image

查看设置是否生效,使用命令行或者图形界面

(Get-MsolUser -UserPrincipalName lili@qwew.partner.onm51CTO提醒您,请勿滥发广告!).licenses.servicestatus

image

image

相关文章
相关标签/搜索