How to prevent powershell long content to be truncated with three dots.

Powershell sometimes truncate large strings with three dots ()

PS C:\> Get-MyServers
{GFMPRD02, GFMPRD04, GFMPRD06, GFMPRD08…}
Even when using the Format-Table command and setting the length via the width property is not always a solution especially when you want to export the result to a CSV format, you can’t use the ft command.
The simplest solution I found is:
to set the variable $FormatEnumerationLimit to -1
PS C:\> $FormatEnumerationLimit =-1
PS C:\> Get-MyServers
{GFMPRD02, GFMPRD04, GFMPRD06, GFMPRD08, GFMPRD09}

Leave a Reply