ECHO %DATE% %TIME% >> C:list.txt
ECHO. >> C:list.txt
DIR C: >> C:list.txt
3. Now save the file
4. Create a new task that launches c:test.cmd
5. Launch your task then check the C:list.txt file to confirm that it ran
1. Create a file called test.ps1 on the root of your C: drive (c:test.ps1)
NOTE – you must have admin rights to write to the root of C: - if not, adjust your script accordingly to point to a location you do have permissions to.
2. Add the following lines to this file:
PS | out-file c:list.txt
3. Now save this file
4. Create a new task that launches powershell.exe with the optional argument of C:test.ps1
5. Launch your task then check the C:list.xt file to confirm that it ran
If needed, you can add multiple outputs in your scripts to see when/where they might be failing. You can be creative in your outputs which can lead you to the exact problem that is preventing your task from running.
Until next time, take care!
Troubleshooting Task Scheduler
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.