以管理员身份运行AAD PS

使用powershell批量分配许可

查看订阅和使用状态

Get-MsolAccountSku

使用powershell批量分配许可

单个用户授予用户许可

使用powershell批量分配许可

Set-MsolUserLicense -UserPrincipalName "[email protected]" -AddLicenses "litwareinc:ENTERPRISEPACK"

批量授予所有用户许可

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

使用powershell批量分配许可

删除单个用户许可

Set-MsolUserLicense -UserPrincipalName [email protected] -RemoveLicenses "litwareinc:ENTERPRISEPACK"

使用powershell批量分配许可

批量删除所有用户许可

$x = Get-MsolUser -All | where {$_.isLicensed -eq $true}; $x | foreach {Set-MsolUserLicense -UserPrincipalName $_.UserPrincipalName -RemoveLicenses "qwew:ENTERPRISEPACK_NO_RMS"}

使用powershell批量分配许可

查看未授权许可的用户

Get-MsolUser -All -UnlicensedUsersOnly

使用powershell批量分配许可

查看所有用户的许可分配状态

Get-MsolUser

使用powershell批量分配许可

isLicensed 属性值为False表示未分配许可,True表示已经分配许可

转载于:https://blog.51cto.com/studyqaz/1898762

相关文章:

  • 2022-12-23
  • 2021-12-02
  • 2022-01-20
  • 2022-01-18
  • 2021-07-16
  • 2022-12-23
  • 2021-12-27
  • 2021-04-05
猜你喜欢
  • 2021-07-28
  • 2022-12-23
  • 2021-12-03
  • 2021-11-19
相关资源
相似解决方案