Estou tentando usar um comando deixe https://docs.microsoft.com/en-us/powershell/scripting/samples/redirecting-data-with-out---cmdlets?view=powershell-7 conforme abaixo
PS C:\WINDOWS\system32> Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath C:\Users\didja\koera dutata\forum questions\out.txt
OutFile : The term 'OutFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:48
+ Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath C:\U ...
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (OutFile:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\WINDOWS\system32> Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath C:\Users\didja\koera dutata\forum questions\out.txt
OutFile : The term 'OutFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:48
+ Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath C:\U ...
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (OutFile:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\WINDOWS\system32> Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath "C:\Users\didja\koera dutata\forum questions\out.txt"
OutFile : The term 'OutFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:48
+ Get-Process | Format-List | Out-Host -Paging | OutFile -FilePath "C:\ ...
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (OutFile:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\WINDOWS\system32> Get-Process | Out-Host -Paging | OutFile -FilePath "C:\Users\didja\koera dutata\forum questions\out.txt"
OutFile : The term 'OutFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:35
+ Get-Process | Out-Host -Paging | OutFile -FilePath "C:\Users\Danda K ...
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (OutFile:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:\WINDOWS\system32> Get-Process | OutFile -FilePath "C:\Users\didja\koera dutata\forum questions\out.txt"
OutFile : The term 'OutFile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that
the path is correct and try again.
At line:1 char:16
+ Get-Process | OutFile -FilePath "C:\Users\didja\koera duta ...
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (OutFile:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Qual é o erro no uso acima?
Acho que você está tentando fazer um Tee. Aqui está o que você precisa:
out-host
eout-file
são mutuamente exclusivos. Você precisa usar um ou outro.