

To remove licenses from an existing user account, use the following syntax: Set-MsolUserLicense -UserPrincipalName -RemoveLicenses "", "". If you use the Get-MsolUser cmdlet without using the -All parameter, only the first 500 accounts are returned. View account license and service details with PowerShell View licenses and services with PowerShell To view the licensing plan ( AccountSkuID) information in your organization, see the following topics:
#Fpse remove license check without roots windows
Use the Microsoft Azure Active Directory Module for Windows PowerShell $Licenses.RemoveLicenses = (Get-AzureADSubscribedSku | Where-Object -Property SkuID -Value $Skus.SkuId -EQ).SkuID Set-AzureADUserLicense -ObjectId $userUPN -AssignedLicenses $licenses $Licenses.RemoveLicenses += (Get-AzureADSubscribedSku | Where-Object -Property SkuID -Value $Skus.SkuId -EQ).SkuID $licenses = New-Object -TypeName .AssignedLicenses

$Skus = $userList | Select -ExpandProperty AssignedLicenses | Select SkuID $userList = Get-AzureADUser -ObjectID $userUPN

To remove all of the licenses for a specific user account, specify the user sign-in name, remove the "" characters, and run these commands. Set-AzureADUserLicense -ObjectId $userUPN -AssignedLicenses $license $License.RemoveLicenses = (Get-AzureADSubscribedSku | Where-Object -Property SkuPartNumber -Value $planName -EQ).SkuID $license = New-Object -TypeName .AssignedLicenses Next, get the sign-in name of the account for which you want remove a license, also known as the user principal name (UPN).įinally, specify the user sign-in and license plan names, remove the "" characters, and run these commands. Get-AzureADSubscribedSku | Select SkuPartNumber Next, list the license plans for your tenant with this command. Use the Azure Active Directory PowerShell for Graph moduleįirst, connect to your Microsoft 365 tenant. For a list of additional resources, see Manage users and groups.
#Fpse remove license check without roots how to
Learn how to remove licenses from user accounts with the Microsoft 365 admin center.
