Powershell ISE is the scripting editor you use to edit PS files and debug them, not run scripts.
Try using C:\windows\system32\windowspowershell\v1.0\powershell.exe
instead.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am trying to run automation using Task Scheduler on my Windows Server 2019 which is my SQL server.
I have created a Windows PowerShell script that calls to an external Azure site to grab a file and store it locally. In my script, I need to run a command to execute the task.
Unfortunately, when setting up Task Scheduler to have this run automatically, it is failing with the directory name is invalid.
Program/Script - Points to PowerShell - C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe
Add Arguments points to the command you need to run once the script it open
Start in points to my .ps1 script
When I run it, I get: Task Scheduler failed to launch action "C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe" in instance "{97f26cda-8700-4dc2-93ee-f3df8823962f}" of task "\UAT Backup". Additional Data: Error Value: 2147942667.
Powershell ISE is the scripting editor you use to edit PS files and debug them, not run scripts.
Try using C:\windows\system32\windowspowershell\v1.0\powershell.exe
instead.
editing out file