licensingdiag /resetgraceperiod

Set to "Enabled" and specify the desired number. Troubleshooting common termsrv.dll Issues

If termsrvdll is intact but claims the grace period is expired, use licensingdiag.exe tool: