Add/remove license bằng CLI - 2

Thực hiện xóa lic Teams Ent, thay bằng Teams Ess:

#Connect-MgGraph -Scopes User.ReadWrite.All

# User
$userId = "user@domain.com"

# SKU ID
$teamsEss = "3ab6abff-666f-4424-bfb7-f0bc274ec7bc"   # Teams Essentials
$teamsEnt = "7e31c0d9-9551-471d-836f-32ee72be4a01"   # Teams Enterprise

# Remove Teams Ent + Add Teams Ess
Set-MgUserLicense -UserId $userId `
    -AddLicenses @(@{SkuId = $teamsEss}) `
    -RemoveLicenses @($teamsEnt)

Write-Output "Removed Teams Ent, Added Teams Ess"

No comments:

Post a Comment

VM mới từ Rocky template

Tạo VM mới từ template Rocky đã có Mở Gitlab > Build > Pipelines > bấm [New Pipeline] Chọn PLAYBOOK: new_server, LIMIT: VM name ...