'Why does Out-File throw an error when the content is a filename?
I'm trying to write a filename to a file, and get the error below. Can anyone explain what the issue is and how to fix it?
Out-File : A positional parameter cannot be found that accepts argument 'ARCK-DEK-79457884.bin'.
At C:\Users\DM\Documents\KB\V6.4_Regtest\Get-Cert.ps1:9 char:1
+ out-file -filepath "crtname.txt" -encoding Default $crtf
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Out-File], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.OutFileCommand
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
