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
-
- Enthusiast
- Posts: 59
- Liked: 2 times
- Joined: Nov 18, 2015 10:12 am
- Full Name: Freddie
- Contact:
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: Scheduled task
Hi,
Also kindly provide the body of the script and the error message that you get.
Thanks
Do you mean that the script fails if you specify it within the job?when i choose to open .ps1 files through powershell automatically, the script seems to fail?
Do you want to run it with windows Task Scheduler or with Veeam? Please elaborate.i would like to run this script as a scheduled task
Also kindly provide the body of the script and the error message that you get.
Thanks
-
- Veeam Software
- Posts: 1818
- Liked: 655 times
- Joined: Mar 02, 2012 1:40 pm
- Full Name: Timothy Dewin
- Contact:
Re: Scheduled task
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
Who is online
Users browsing this forum: No registered users and 10 guests