Hi All,
First time posting here and very new to powershell and scripting in general so thank you to anyone for their help. I've read the "Redirect output of a script to a file" thread and have Powershell v2.0.
I tried the #$psise.CurrentPowerShellTab.Output.Text | Set-Content -Path iseoutput.txt and that worked great while I had my powershell script open to run.
I've also tried the Start-Transcript commands but get "This host does not support transcription." Also tried Get-Process Out-File but that is giving me the process output and not what I need.
Only problem is I'm trying to automate this with my task scheduler to run everyday and with the ISE not open, the script no longer posts to the .txt file. It creates the .txt file but there's no data in it.
Does anyone know the scripting needed to have my console output post to a .txt file?
Also some background on my powershell script, it retrieves excel files from a folder and uploads them to a sql server database. The reason I need to post the console output is because I need to track the errors if any of these files don't upload properly.
Thanks for your help