tag:blogger.com,1999:blog-8600848.post587090540748227651..comments2023-08-04T14:50:42.868+02:00Comments on msgoodies: Messing with output from Format-TableAnonymoushttp://www.blogger.com/profile/14713138671966546640noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8600848.post-78464663037245258902009-11-21T00:40:19.814+01:002009-11-21T00:40:19.814+01:00@Jason
Your suggestion was also my first reaction...@Jason<br /><br />Your suggestion was also my first reaction, but to still be able to utilize Format-Table and to let people use what they already know, I decided to look a way to manipulate the output from Format-Table.<br /><br />:)Per Østergaardhttps://www.blogger.com/profile/12128790394950237942noreply@blogger.comtag:blogger.com,1999:blog-8600848.post-25055136713861922152009-11-19T23:54:25.953+01:002009-11-19T23:54:25.953+01:00To answer the user's question, it would be far...To answer the user's question, it would be far easier to do this:<br /><br />dir | ForEach-Object {"Mode Name";"---------"} {"{0}{1}" -f $_.Mode,$_.Name}<br /><br />I used string formatting so that you can add padding like so: "{0,-10}{1}"<br /><br />Now, if you wanted to do this for any ole object, then it would be more worth while to let Format-Table do the dirty work.Anonymoushttps://www.blogger.com/profile/15144351512413298258noreply@blogger.com