Answer the question
In order to leave comments, you need to log in
How to display custom string output name in powershell?
Hello. how to output custom table name when executing Out-File command?
Tried Format-table NAME , doesn't work.
Answer the question
In order to leave comments, you need to log in
This is how it is solved!
Команды выполнения | Out-File D:\TEXT.txt -Append -NoClobber
(Get-Content D:\TEXT.txt).replace('ScriptOutput(Какой текст заменяем)', 'Какой текст хотим получить"') | Out-File Out-File D:\TEXT.txt -Append -NoClobber
If you just need to give the table a common name try something like this:
$1 = Get-NetAdapter ethernet | fl #for example
$2 = "Table Name"
$3 = "--------------------------"
$2,$3,$1 | Out-File -FilePath "c:\temp\1.txt"
If this is not exactly what you need, please provide an example script in which you get the table name and where it needs to be changed
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question