Welcome to the forum. Such a command works fine under Windows CMD, the old command line interpreter, which I think is what most Windows Fortranners use. Regarding PowerShell, your question has been answered on StackOverflow, where it is suggested to do something like
Get-Content input.txt | ./program > output.txt
I wonder if any Windows users prefer to use PowerShell for their scientific computing, and if so, what its benefits are.