A nifty powershell timer module

I use Powershell for setting up renders a lot. And often I want to give something time to render, then compress it, send it to the internets, shut down the workstation, whatever. I used to just use the Start-Sleep commandlet (Sleep to its friends), but because I like complicating things here’s a nifty replacement.

This module gives you a countdown timer. You specify how long you want it to run, and it ticks away, counting the seconds down, it’s even got an old-school spinner. That’s all it does, but I think it does it well.

To install it, put the folder containing the psm file in your modules folder. That’s usually in your Documents folder in the sub-folder \WindowsPowerShell\Modules\
Then either import the module manually using the command below, or put this line in your profile.ps1 for it to be always available.

Import-Module CountdownTimer

To run specify the -Days, -Hours, -Minutes, and / or seconds you want it to run for. You can also specify -TickLength which determines how often it updates.

    Start-CountdownTimer [[-Days] <int>] [[-Hours] <int>] [[-Minutes] <int>] [[-Seconds] <int>] [[-tickLength] <int>]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.