But what if you have a script that outputs a lot of information to the screen and you want it in a more usable form such as a text file that you can send to others?
In DOS, there is a command ">" that let's you do this. There is something similar in Powershell.
Let's say your script is called script.ps1 then you can do:
powershell.exe -File c:\script.ps1 >> C:\outputfile.txt
and it will spit out the output and put into the file called outputfile.txt.
I will show you an example in my next blog post.