Stopping PowerShell from truncating values in tables

A quick PowerShell Tip.

I’ve just stumbled upon this within the scripting guy blog, and I felt I must (re)share it.

Don’t we all hate it when values are displayed and being truncated with “…” ?

PS C:\> Get-Service -Name winmgmt | ft name, DependentServices -AutoSize
Name    DependentServices
----    -----------------
winmgmt {wscsvc, vmms, SUService, SharedAccess...}

It turns out that the system variable $FormatEnumerationLimit is controlling this behavior and there’s a way to properly eliminate these. the article suggests setting to “4” but “-1” will be also a good option.

https://blogs.technet.microsoft.com/heyscriptingguy/2013/02/19/powertip-change-powershell-to-display-more-info-by-default/

Enjoy ! ( I know I did )

Leave a Reply

Your email address will not be published. Required fields are marked *