I have a PowerShell script that produces output to the screen when running it from the PowerShell command line. When I run the PowerShell script as a Scheduled Task, where can I find the output?
|
feedback
|
|
You won't find your output anywhere from your scheduled task. I would suggest sending your scripts output to a text file, you can do so easily by piping your output to the out-file command, e.g.
Or output the whole of your files output using a standard DOS file redirect > file.txt | |||
|
feedback
|
|
As far as I know, you won't find it anywhere. You'll need to either open a text file and write the output there, or write a small batch file that redirects standard output to a text file. For example, I use a batch file something like this:
| |||
|
feedback
|
|
In a scheduled task just prefix the entire command with cmd /c example: cmd /c powershell test.ps1 > output.txt | |||
|
feedback
|