Scheduling a PowerShell Script using Windows Task Scheduler by Jack Fruh @sharepointjack

SharePointJack · 76K views · 2013 · 2:57

Open on YouTube

Python, Ruby & scripting languagesTesting, debugging & developer toolsCloud, DevOps & reliabilitytutorial

Why Stack Overflow recommends it

Stack Overflow users link it when answering how to run a PowerShell script automatically through Windows Task Scheduler.

Recommended by 1 people across 1 different months, 2015 to 2017.

What it is

A short screencast by Jack Fruh (SharePointJack) showing how to create a scheduled task in Windows Task Scheduler that runs a PowerShell script on a schedule. It walks through the task setup using powershell.exe and the script path.

What people said

Recommends Mickael Pilote · 2016-09 · Stack Overflow · on “How do I execute a PowerShell script automatically using Windows task scheduler?”

After several hours of test and research over the Internet, I've finally found how to start my PowerShell script with task scheduler, thanks to the video Scheduling a PowerShell Script using Windows Task Scheduler by Jack Fruh @sharepointjack [this video] . Program/script -> put full path through powershell.exe C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe Add arguments -> Full path to the script, and the script, without any " ". Start in (optional) -> The directory where your script resides, without any " ".

Cites user2848401 · 2015-12 · Stack Overflow · on “About Add-azure Account /After 12 hours log-out, Is the way never log-out?”

I am very new at Azure Powershell, I have been using Powershell for 2 weeks Almost all of every morning, I have to "Add-AzureAccount" to log in, since after 12 hours, Azure Powershell automatically log out. This is what I understood Add-AzureAccount : The given key was not present in the dictionary [LINK] However, this morning I do not need to Add-AzureAccount, It was already logged in, I have not used Azure Powershell for this weekends. This happens before, This really confused me, since I am having really hard time to understand this "12 hours automatically log out". One time, I had to uninstall/reinstall powershell The reason Why I am asking this question is that my boss wants me to write

Cites abautista · 2017-05 · Stack Overflow · on “How to execute script on schedule?”

In Windows I have come up with two solutions. First option: Create a .bat file. Step 1 Create a .bat file to indicate the command you want to run and the script file that will be executed, for instance: start C:\Users\userX\Python.exe C:\Users\userX\PycharmProjects\Automation_tasks\create_workbook.py Step 2 Open the Task Scheduler and click on the Task Scheduler Library to see the current tasks that are executed. Click on the Create Task option. [LINK] Step 3 In the General tab, put the name of your new task and click on the option Run whether user is logged on or not , check the option Run with highest privileges and make sure to setup the appropriate version of you OS (in my case I picked