Restart computers that have been running without a restart for x number of days?

Is it possible to make this tool work as this one:
http://blog.coretech.dk/kea/new-version-of-the-coretech-shutdown-tool/#comment-577591

Restart or shutdown computers that have been running without a restart for more than a specified number or hours/days.

Hi,

I donÀ’t know that tool but why not? How will you be deploying it?

I would like to start it from a Scheduled task via another Powershell script/tool. The task will run as System account but it still needs to work so loged on user will see the popups from the application.