How to Prevent Truncation of Long Output In Powershell

You know how annoying it is when you return some information in Powershell that includes a list of items and the console helpfully truncates it with a …




Whereas what you really want is for it to just show the whole thing like:




Well you can. The truncation is controlled by $FormatEnumerationLimit and if you set it to -1 it won’t truncate output at all. The default for a standard Powershell instance is 4, the Exchange Management Shell ups this to 16 and other console files may make their own modifications.


2 Replies to “How to Prevent Truncation of Long Output In Powershell”

    1. Sure. $FormatEnumerationLimit is a built-in variable that controls how many items powershell outputs when presented with a large array such as, say, the list of emailaddresses on a mailbox. Normally to see the truncated data you’d need to do something like “Get-Mailbox | Select -ExpandProperty emailaddresses” but by changing this value ($FormatEnumerationLimit = -1, for example) you change the display behaviour and get the full output to the console.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.