PowerShell script exchange
Post Reply
ftbug
Enthusiast
Posts: 59
Liked: 2 times
Joined: Nov 18, 2015 10:12 am
Full Name: Freddie
Contact:

Scheduled task

Post by ftbug »

Hi, i have been running some powershell scripts to disable a group of jobs, which are running fine when right clicking the .ps1 file and running with powershell, however, when i choose to open .ps1 files through powershell automatically, the script seems to fail?

i would like to run this script as a scheduled task, but when the option is selected to open the file with powershell it fails, and when the option isnt selected, the scheduled task just opens the notepad form of the .ps1 file
PTide
Product Manager
Posts: 6408
Liked: 724 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Scheduled task

Post by PTide »

Hi,
when i choose to open .ps1 files through powershell automatically, the script seems to fail?
Do you mean that the script fails if you specify it within the job?
i would like to run this script as a scheduled task
Do you want to run it with windows Task Scheduler or with Veeam? Please elaborate.

Also kindly provide the body of the script and the error message that you get.

Thanks
tdewin
Veeam Software
Posts: 1775
Liked: 646 times
Joined: Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin
Contact:

Re: Scheduled task

Post by tdewin »

you might want to run the script not directly but via powershell.exe and then -c c:\scr\script.ps1 as arguments so that the whole task commandline would be powershell -c c:\scr\script.ps1
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests