I would like to get to know how to redirect output of some program in PowerShell to file.
In cmd I used to do it like this:
some.exe > test.in
In PowerShell like this:
.\some.exe > test.in
But this code doesn’t work:
for($i = 0; $i -le 5; $i++)
{
& '.\some.exe > test.in'
}
So, could you tell me, what should I do to make it work?
Here’s an example that works