How do you pass an argument to a Windows scheduled task with spaces in it?
Note the use of ‘ in the path of a file to be run. I believe this behavior was added to prevent spaces in the file path to the exe causing problems….Here is an example:
- Program/script: powershell.exe.
- Add arguments: -command "& ‘C:\HSD – Copy\logoffstudents. ps1’ " -NonInteractive.
- Start in: Blank.