Q: Is it possible to Script Reset Terminal Server (RDS) Grace Period using PowerShell?
chicagotech.net: Yes, delete the REG_BINARY in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\GracePeriod
Or go to this page to download powershell script: https://gallery.technet.microsoft.com/scriptcenter/Reset-Terminal-Server-RDS-44922d91