Tag Archives: Task Scheduler

Run Powershell scripts from Windows task scheduler

With this short post I want to share information what you have to do to run Microsoft Powershell scripts from Windows task scheduler.

The challenge

I like to automate tasks I want to run on a daily basis. Earlier I did that with batch scripts but I ran into the challenge to use workarounds to handle pretty basic things. For example if I want to call specific commands only once a week. Did you ever try get the day of the week within a batch script? Or did you try to get the current date formats in a way you can use it to name a folder. Sometimes the easier way is to call a VB Script within a batch script or you have to cut the date string into pieces an reorder the parts in the way you need it.

Powershell is way more powerful (perhaps that is where the name comes from?) and we have a bigger range of opportunities. Since Powershell is deeper integrated in Microsoft Windows than batch ever had been the interaction with files, properties and Windows services is much easier. Powershell gives us much better output than batch does so that we can reuse informations a command outputs.
Continue reading