Commands › Microsoft Teams
Remove-CsUserLicenseGracePeriod
The `CsUserLicenseGracePeriod` cmdlet expedites the delicensing operation for the assigned plan(s) of a user/resource account by removing the grace period, permanently deleting the assigned plan(s). Note that this cmdlet is to be used only by tenants with license resiliency enabled. (License resiliency is currently under private preview and not available for everyone.)
Quick start script
# Remove-CsUserLicenseGracePeriod — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-MicrosoftTeams -CertificateThumbprint $thumb -ApplicationId $appId -TenantId $tenantId
# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-CsUserLicenseGracePeriod
$before | Format-List
# 3. Make the change (dry run first)
Remove-CsUserLicenseGracePeriod -Body <IUserDelicensingAccelerationPatch> -Identity <String> -InputObject <IConfigApiBasedCmdletsIdentity> -WhatIf
Remove-CsUserLicenseGracePeriod -Body <IUserDelicensingAccelerationPatch> -Identity <String> -InputObject <IConfigApiBasedCmdletsIdentity>
# 4. Verify and diff
$after = Get-CsUserLicenseGracePeriod
Compare-Object ($before | Out-String) ($after | Out-String)
Syntax
Remove-CsUserLicenseGracePeriod
[-Identity] <String>
[-Capability <String>]
-InputObject <IConfigApiBasedCmdletsIdentity>
[-Action <String>]
-Body <IUserDelicensingAccelerationPatch>
[-PassThru]
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Parameters (7)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.