Windows Task Scheduler creates schedules, and periodically executes PowerShell commands

Source: Internet
Author: User

"Introduction to the Environment"

Operating system: Windows Server r2,64-bit operating system

PowerShell Version: PowerShell 1.0

Script Location: C:\BACKUP.PS1

Startup directory: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell.exe

"Step Diagram"

1. Open Windows Task Scheduler

2. Click "Create Task"

3. Enter "name", "Configuration" to select your corresponding system configuration.

4. Select the "Triggers" tab and click on the "New" button

5. According to your needs, after filling out the trigger, click OK to return

6. Click on the "Actions" tab and click on the "New" button

7. In the "program or script" location, add our PowerShell startup directory; "Add parameter" location, adding our script location, as shown in

Post-Program script: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\PowerShell.exe

Add parameter (optional):-noninteractive "C:\BackUp.ps1"

8. Click "Confirm" to complete the task plan additions.

At this point, we are using the Windows Task Scheduler to create a PowerShell command that is automatically executed.

Windows Task Scheduler creates schedules, and periodically executes PowerShell commands

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.