简体   繁体   中英

Navigation powershell script fails when run through task scheduler

I am navigating to url to take screenshot of the web page using powershell. Scripts are running when i am manually doing it from powershell and after creating batch files if i am manually executing. I am trying to automate everyday using task scheduler but script fails there. Tried the below from task scheduler: 1. Tried attaching batch file to Program/script task scheduler. 2. Tried Powershell.exe in Program/script than adding path to Add arguments.

Following Add arguments i tried in task scheduler: -ExecutionPolicy Bypass C:\\abc\\xyz.ps1 -RunType $true

or just specifying the path C:\\abc\\xyz.ps1

So you're trying to create a screenshot from powershell in a non-interactive session. That won't work, there's no UI to create a screenshot from.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM