A simple powershell script that can restart any windows service. Here i have used this to restart the QlikViewServer service that would free up accumulated memory. Beaware that this should be done when no user is active on the application as the restart will bring down the application.