Answers for "powershell remove licenses office 365"

0

powershell remove licenses office 365

$userArray = Get-MsolUser -All | where {$_.isLicensed -eq $true}
for ($i=0; $i -lt $userArray.Count; $i++)
{
Set-MsolUserLicense -UserPrincipalName $userArray[$i].UserPrincipalName -RemoveLicenses $userArray[$i].licenses.accountskuid
}
Posted by: Guest on April-12-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language