Hello,
Thank you for posting in the Microsoft community forum.
I understand that you can run this script manually, but it won't work properly under task scheduler.
It is recommended that you first check the following configuration:
- Ensure that the task scheduler is running as a user with sufficient permissions. Try to check the "Run with highest permission" option.
- Ensure that the Actions TAB in the task scheduler is configured correctly. The action should be to launch wscript.exe and pass your.vbs file as a parameter. Note If the path contains Spaces, use double quotation marks. For example:
Program/script: wscript.exe
Add parameter: "C:\path\with spaces\to\your\script.vbs"
You can try creating a simple batch file (.bat) to invoke your script and schedule the task scheduler to run this batch file.
For example, create a '.bat 'file with the following content:
@echo off
wscript "C:\path\to\your\script.vbs"
I hope this helps.
Best regards
Jacen