Freigeben über


Profile Power: Default Parameter for Format-Table and Format-Wide

I'm lazy.

When I run Format-Table and Format-Wide, the effort of typing -A and pressing Tab to give me -AutoSize weighs heavy on my fingers!

And, so it is that I use the  $PSDefaultParameterValues variable, in my PowerShell profile, to automatically add the -AutoSize parameter every time I run Format-Table or Format-Wide.

 

 
$PSDefaultParameterValues['Format-[wt]*:Autosize'] = $true

 

And, it's as simple as that. Have a look at the about_Parameters_Default_Values help file for more information.