Windows 10: Problem getting a powershell script to run in Task Scheduler

Discus and support Problem getting a powershell script to run in Task Scheduler in Windows 10 Software and Apps to solve the problem; Hello. I am trying to get a PowerShell script to run once every half hour in the Task Scheduler utility. The platform is Windows Server 2019 Standard... Discussion in 'Windows 10 Software and Apps' started by ahkaplan, Aug 9, 2023.

  1. ahkaplan Win User

    Problem getting a powershell script to run in Task Scheduler


    Hello. I am trying to get a PowerShell script to run once every half hour in the Task Scheduler utility. The platform is Windows Server 2019 Standard Edition. I configured the script to run on a schedule starting at 12:00 AM every day, and repeat every 30 minutes indefinitely. The script is designed to do a check of disk space usage on several remote servers, and email the results as an attached html file. The user account that is associated with the script does have Administrator access on all servers. The script itself is configured to run whether the user account is logged in or not, and al

    :)
     
    ahkaplan, Aug 9, 2023
    #1
  2. dalchina Win User
    dalchina, Aug 9, 2023
    #2
  3. IoanaOrian, Aug 9, 2023
    #3
  4. Aguden Win User

    Problem getting a powershell script to run in Task Scheduler

    Problem Getting a Powershell Script to Run in Task Scheduler

    Hope I'm in the right place!

    I am trying to get a Powershell script to run daily in the task scheduler. It basically purges a folder on one of my drives:

    Get-ChildItem –Path “D:\Dropbox\Quicken\Backup” –Recurse | Where-Object CreationTime –lt (Get-Date).AddDays(-10) | Remove-ItI

    I can run it from a CMD prompt and I set it up in the task scheduler and it seemed to run one time on schedule and then hasn't run since that initial time. I have tried to run it manually from the task scheduler but it gets and error "Task Start Failed."

    I have attached copies of the properties tabs and the main view of the task scheduler with the History showing. Any ideas? I didn't find a tutorial, but I'm sure there is something on the website!

    Cordially,

    Al Guden

    TS-TaskView.pdf
    PROPERTIES-Settings.pdf
    PROPERTIES-Actions.pdf
    PROPERTIES-Triggers.pdf
    PROPERTIES-General.pdf
    PROPERTIES-History.pdf
    PROPERTIES-Conditions.pdf
     
    Aguden, Aug 9, 2023
    #4
Thema:

Problem getting a powershell script to run in Task Scheduler

Loading...
  1. Problem getting a powershell script to run in Task Scheduler - Similar Threads - Problem getting powershell

  2. Problem getting a powershell script to run in Task Scheduler

    in Windows 10 Gaming
    Problem getting a powershell script to run in Task Scheduler: Hello. I am trying to get a PowerShell script to run once every half hour in the Task Scheduler utility. The platform is Windows Server 2019 Standard Edition. I configured the script to run on a schedule starting at 12:00 AM every day, and repeat every 30 minutes...
  3. Scheduled Task to run powershell script via GPOcomputer on a particular day

    in Windows 10 Gaming
    Scheduled Task to run powershell script via GPOcomputer on a particular day: Hi Reader, How to create a scheduled task to run a powershell script whether user is logged on or not during a specific time via GPO. I have implemented it locally using the following settings, which prompts for the user account password while creating the scheduled task....
  4. Scheduled Task to run powershell script via GPOcomputer on a particular day

    in Windows 10 Software and Apps
    Scheduled Task to run powershell script via GPOcomputer on a particular day: Hi Reader, How to create a scheduled task to run a powershell script whether user is logged on or not during a specific time via GPO. I have implemented it locally using the following settings, which prompts for the user account password while creating the scheduled task....
  5. Scheduled Task to run powershell script via GPOcomputer on a particular day

    in Windows 10 Network and Sharing
    Scheduled Task to run powershell script via GPOcomputer on a particular day: Hi Reader, How to create a scheduled task to run a powershell script whether user is logged on or not during a specific time via GPO. I have implemented it locally using the following settings, which prompts for the user account password while creating the scheduled task....
  6. Powershell script does not run via Task Scheduler

    in Windows 10 Customization
    Powershell script does not run via Task Scheduler: PowerShell script runs fine manually, but doesn't run in Task scheduler. The script: [ATTACH] I tried another command$env:COMPUTERNAME and works fine both manually and via PowerShell....
  7. PowerShell script does not run as Scheduled Task – 0xFFFD0000 error

    in Windows 10 News
    PowerShell script does not run as Scheduled Task – 0xFFFD0000 error: [ATTACH] [ATTACH]The Windows 10 Task Scheduler is a boon for a group of users who like to schedule different tasks and automate them. I use it all the time to schedule periodic execution of scripts and some programs to ensure my [...] This post PowerShell script does not run...
  8. Window 10 with WSL Task Scheduler task run at Startup/Logon running a PowerShell script...

    in Windows 10 Installation and Upgrade
    Window 10 with WSL Task Scheduler task run at Startup/Logon running a PowerShell script...: Here is the content of PowerShell script I am trying to run via a startup or log on task created via Task Scheduler in Windows 10. #power shell file saved as autostartsshd.ps1 bash -c 'sudo service ssh start' This runs fine when run with powershell. But running from...
  9. Task Scheduler doesn't run script

    in Windows 10 Software and Apps
    Task Scheduler doesn't run script: Hey Microsoft Community, I'm trying to create a task in Task Scheduler that runs a specific script. The issue is that when the task runs (whether I do it manually or if it's scheduled), the script doesn't actually get executed. I know that the script works, and I have tried...
  10. Problem Getting a Powershell Script to Run in Task Scheduler

    in Windows 10 Software and Apps
    Problem Getting a Powershell Script to Run in Task Scheduler: Hope I'm in the right place! I am trying to get a Powershell script to run daily in the task scheduler. It basically purges a folder on one of my drives: Get-ChildItem –Path “D:\Dropbox\Quicken\Backup” –Recurse | Where-Object CreationTime –lt (Get-Date).AddDays(-10) |...