Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

SQL Server DBA Jobs

How to schedule Powershell Script with Task Scheduler

20 September,2016 by Tom Collins

Question: How can I schedule a Powershell Script with Windows Task Scheduler? I’d like to execute the Powershell Script once a day . The Powershell Script will be in a batch file, along with other Powershell Scripts

Answer: Executing a Windows batch file with Powershell Scripts is a straightforward process. 

Before you set up the Task Scheduler , check you can execute the Windows batch with the included Powershell script and get the expected result. Attempt to complete this step with the relevant permissions.This step allows you to confirm the batch file and scripts are working as expected.

  1. Open Windows task scheduler
  2. Create new task
  3. In the process of creating a new task , use the Actions tab to add the details of the batch file you’d like to execute.

 

Task_scheduler_powershell

Read More

How to List Task Scheduler Eventlog with messages using Powershell

SQL Agent Jobs – Schedule in seconds (SQL Server DBA)

Powershell Scripts for DBA

Powershell , Excel charts and data presentation

 


Author: Tom Collins (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to schedule Powershell Script with Task Scheduler


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer