Scheduling a PowerShell Script

A Power Shell Script can be scheduled using the Windows Task Scheduler. Once you have the PowerShell script ready, you could schedule the PowerShell script by launching the Windows Task Scheduler

Screen Shot 2018-02-18 at 7.45.05 PM.png

  1. On the right click on Create Basic Task
  2. Then it would open up a small window which has three main tabs that you need to focus on-GeneralTriggers and Actions.
  3. On the General tab, select the radio button “Run whether a user is logged in or not”or otherwise depending on whether you want to run the script when the user is logged In.
  4. On the Triggers tab, specify the time/frequency when the script needs to run.
  5. On the Actions Tab, Choose the Action “Start a Program” from the Dropdown and enter PowerShell.exe. Then against the parameters specify the Path of the PowerShell script and click OK.

Now your PowerShell script would run at the scheduled time provided the system is powered ON.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s