Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

"Format-Table -autosize" as default

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 01-17-2007   #1 (permalink)
Shafik
Guest


 

"Format-Table -autosize" as default

Hi,
Is it possible to register in some config file that when ever I use
"format-table" the shell will call "format-table -autosize" ?
i.e.
ls | ft
will actually call
ls | ft -autosize


My System SpecsSystem Spec
Old 01-17-2007   #2 (permalink)
$hay
Guest


 

Re: "Format-Table -autosize" as default

check out "Change Help default behaviour" post on this blog

--
$hay
http://scriptolog.blogspot.com



"Shafik" <shaharh@gmail.com> wrote in message
news:1169062694.357282.201550@11g2000cwr.googlegroups.com...
> Hi,
> Is it possible to register in some config file that when ever I use
> "format-table" the shell will call "format-table -autosize" ?
> i.e.
> ls | ft
> will actually call
> ls | ft -autosize
>



My System SpecsSystem Spec
Old 01-17-2007   #3 (permalink)
$hay
Guest


 

Re: "Format-Table -autosize" as default

correction, on this newsgroup

--
$hay
http://scriptolog.blogspot.com



"$hay" <no@addre.ss> wrote in message
news:%23zwO5mnOHHA.3900@TK2MSFTNGP06.phx.gbl...
> check out "Change Help default behaviour" post on this blog
>
> --
> $hay
> http://scriptolog.blogspot.com
>
>
>
> "Shafik" <shaharh@gmail.com> wrote in message
> news:1169062694.357282.201550@11g2000cwr.googlegroups.com...
>> Hi,
>> Is it possible to register in some config file that when ever I use
>> "format-table" the shell will call "format-table -autosize" ?
>> i.e.
>> ls | ft
>> will actually call
>> ls | ft -autosize
>>

>
>



My System SpecsSystem Spec
Old 01-17-2007   #4 (permalink)
Keith Hill [MVP]
Guest


 

Re: "Format-Table -autosize" as default

"Shafik" <shaharh@gmail.com> wrote in message
news:1169062694.357282.201550@11g2000cwr.googlegroups.com...
> Hi,
> Is it possible to register in some config file that when ever I use
> "format-table" the shell will call "format-table -autosize" ?
> i.e.
> ls | ft
> will actually call
> ls | ft -autosize


I would advise against changing the default behavior. In order to auto-size
the format-table cmdlet has to buffer up *all* objects in order to determine
the optimal size for each column. This negatively impacts memory usage and
prevents you from seeing any output until all input has been processed. On
a small directory listing this isn't very noticeable but on a large
directory (say \windows\system32) it definitely is.

--
Keith


My System SpecsSystem Spec
Old 01-21-2007   #5 (permalink)
Andrew Watt [MVP]
Guest


 

Re: "Format-Table -autosize" as default

On Wed, 17 Jan 2007 14:38:11 -0700, "Keith Hill [MVP]"
<r_keith_hill@no.spam.thank.u.hotmail.com> wrote:

>"Shafik" <shaharh@gmail.com> wrote in message
>news:1169062694.357282.201550@11g2000cwr.googlegroups.com...
>> Hi,
>> Is it possible to register in some config file that when ever I use
>> "format-table" the shell will call "format-table -autosize" ?
>> i.e.
>> ls | ft
>> will actually call
>> ls | ft -autosize

>
>I would advise against changing the default behavior. In order to auto-size
>the format-table cmdlet has to buffer up *all* objects in order to determine
>the optimal size for each column. This negatively impacts memory usage and
>prevents you from seeing any output until all input has been processed. On
>a small directory listing this isn't very noticeable but on a large
>directory (say \windows\system32) it definitely is.


Keith,

I don't disagree with your point, but I think it would be useful to
allow users to coinfigure the desired behaviour. Different people use
PowerShell in different ways.

Possibly a suggestion on Connect for the next version?

Andrew Watt MVP
My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Windows cannot format the system partition on this drive" stchad Vista installation & setup 1 07-14-2008 04:30 PM
New Problem - "From" Address format in "Microsoft Communities" John Saunders [MVP] Live Mail 5 04-03-2008 07:35 AM
Vista not wotking with "My Computer" or "Control Panel", "Screen Saver" Platebanger Vista General 6 02-05-2008 08:54 AM
"format-table" command which is conflicting with the default formatting Norbert Kraft PowerShell 0 01-04-2007 03:15 AM
how can I unformat "quick format" of drive D rmonzon Vista account administration 5 06-20-2006 12:02 PM


Update your Vista Drivers Update Your Drivers Now!!

Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008