How to display custom output name strings in powershell?

Hi all. how to display a custom table name when you run the command Out-File?
I tried Format-table NAME , not execute.
March 20th 20 at 11:20
2 answers
March 20th 20 at 11:22
Solved it is!

Commands | Out-File D:\TEXT.txt -Append-NoClobber
(Get-Content D:\TEXT.txt).replace('ScriptOutput(the text model)', 'What text I want to"') | Out-File Out-File D:\TEXT.txt -Append-NoClobber
March 20th 20 at 11:24
If you just need to ask the General name of the table 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 it's not quite what you need, please give an example script where you have the table name and where you want it to change
Try the output of each part of the script (last 3 lines) to drive to 3 different variables, and then to apply to each variable -replace with replacement text ScriptOutput on the desired text and then send the output to a text file. - Jake.Balistreri commented on March 20th 20 at 11:27

Find more questions by tags PowerShell