I'm attempting to redirect the output of the help message from a binary to an output.txt file, but the help message isn't being redirected as expected. I've tried several different solutions, but none have worked. Here are the commands I've tried (I've tried transcript to and it doesn't work):
PS D:\user\drivers> wmic process call create ".\drivers.exe -h" > output.txtPS D:\user\drivers> cat .\output.txtExécution (Win32_Process)->Create()Méthode exécutée.Paramètres de sortie :instance of __PARAMETERS{ ReturnValue = 9;};PS D:\user\drivers> $output = Invoke-Expression ".\drivers.exe -h"PS D:\user\drivers>PS D:\user\drivers> $output| Out-File -FilePath ".\output.txt"PS D:\user\drivers> cat .\output.txtPS D:\user\drivers> .\drivers.exe -h | Out-File -FilePath ".\output.txt"Usage: /s /e /f <target-path> /s - Un-package the package in silent mode (not showing user interaction UI) /f - Runtime switch that overrides the default target path specified in build time /e - Prevent execution of default executable file specified in build time. Only extracting the content files to target folder(Use this with /s /f)PS D:\user\drivers> cat .\output.txt