I have a small problem with the control output in ps here the line of code in question is here;
$ results | Sort object cn | Format-table-wrap-autooose
if I add
| Outfile $ logfile
The last column of my output has been truncated. Now I know that if I change the width of my console session and run the script again, then my output is OK , But should there be a better way of doing this? I also tried to use the add-content, but I think I should not miss something because the expression has not been implemented correctly and I only get a series of references to the system-object in my logfile.
You can use the width parameter for the out-file cmdlet. You can try Out-File-200 so that there is no shortcut.
Comments
Post a Comment