You can’t hook a file directly to stdin, but you can still access stdin.
Get-Content input.txt | ./program > output.txt
More Related Contents:
- How to perform keystroke inside powershell?
- Delete files older than 15 days using PowerShell
- How to get disk capacity and free space of remote computer
- Recursive file search using PowerShell
- Get remote registry value
- Executing an EXE file using a PowerShell script
- Obtaining ExitCode using Start-Process and WaitForExit instead of -Wait
- Redirection of standard and error output appending to the same log file
- How do I get only directories using Get-ChildItem?
- Web.Config transforms outside of Microsoft MSBuild?
- How to properly -filter multiple strings in a PowerShell copy script
- copy-item With Alternate Credentials
- How do I concatenate two text files in PowerShell?
- Extract the filename from a path
- How to export data to CSV in PowerShell?
- Methods to hex edit binary files via Powershell
- Copy file remotely with PowerShell
- Powershell script to see currently logged in users (domain and machine) + status (active, idle, away)
- Using Invoke-Command -ScriptBlock on a function with arguments
- PowerShell script to check the status of a URL
- Gracefully stopping in Powershell
- Powershell – Reboot and Continue Script
- Hashtables and key order
- Can’t install nuget package because of “Failed to initialize the PowerShell host”
- PowerShell The term is not recognized as cmdlet function script file or operable program
- PowerShell is missing the terminator: “
- Using PowerShell to remove lines from a text file if it contains a string
- What security setting is preventing Remote PowerShell 2.0 from accessing UNC paths
- List of all colors available for PowerShell?
- Prevent trailing newline in PowerShell Out-File command