Skip to content

Commit

Permalink
Merge pull request #1 from atollholding/main-feature-script
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
pbv7 committed Jul 20, 2021
2 parents 2b4c171 + 9ff6a4e commit e296c9c
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# clean-rds-grace-period
Reset RDS grace period on RDS host
# Reset Terminal Server (RDS) grace period to default value

There are conditions when Terminal Server (Remote Desktop Session Host) required for testing purposes in development environments allowing more than 2 concurrent Remote Desktop Sessions on it. Default grace licensing period is 120 days. And in most cases it's fine. But once grace period expires, the server does not allow even a single Remote Desktop session and all that is possible in this case is logon to the Console of machine using physical or virtual console or IP KVM, or try to get in using `mstsc /admin` or `mstsc /console`, then remove the role completely and restart the terminal server and it starts accepting default two RDP sessions.

We sometimes find ourselves in situation when server is nearing to the end of grace period and we don’t have a TS Licensing server in place and we need the default grace period to be reset/extended to next 120 days for testing purposes.

***Note: You will have to restart following services for the reset to come into effect:***

- Remote Desktop Configuration Properties
- Remote Desktop Services

As soon as these services are restarted all the active sessions will be disconnected (**not logged off**). Wait for a short time and reconnect again.

## How to use

- Interactive reset. Remaining grace period value will be displayed before reset confirmation.

```powershell
.\clean-rds-grace-period.ps1
```

- Reset grace period forcefully w/o confirmation.

```powershell
.\clean-rds-grace-period.ps1 -Force
```

## Credits

Based on work of [Prakash82x](https://github.com/Prakash82x/PowerShell/blob/master/TerminalService/Reset-TSGracePeriod.ps1)

0 comments on commit e296c9c

Please sign in to comment.