I am using PowerShell for downloading data from email.
I want to run this process by PowerShell. When I run script like this:
D:\script.ps1
in powershell.exe
it works fine.
When I schedule it in Task Scheduler nothing happens.
I tried it to Set it like Program/script:
powershell
Powershell.exe
powershell.exe
Add arguments:
-executionpolicy bypass -file D:\script.ps1
-file D:\script.ps1
-file "D:\script.ps1"
And nothing works. I'm using Windows 2008 R2.
-noexit
should help you see the error message if there is any and (2) specify full path to powershell e.g.C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
– Tredecillion