Skip to content

How to Fix Truncated PowerShell Output

Fix truncated PowerShell output in the console, text files, and reports with Format-Table -Wrap, Out-File -Width, CSV exports, and FormatEnumerationLimit.

MGMCSA Guru Team June 2, 2026 9 min read
PowerShell terminal output showing a wide table being wrapped instead of truncated

PowerShell truncation usually looks worse than it is. You run a command, the data is there, but the screen only shows part of it. A long path ends with ..., a table column gets squeezed, or a list property shows only the first few values. Nothing is necessarily broken. PowerShell is formatting objects for display, and the display layer is trying to fit too much into the space it has.

The fix depends on where the truncation happens. A wide table in the console needs a different answer than a text file created with Out-File, and both are different from a collection property that only shows four items. This guide walks through the fixes sysadmins actually use: wrapping tables, selecting fewer properties, increasing file width, exporting real objects to CSV, and changing $FormatEnumerationLimit when the formatter is hiding collection values.

Quick fixes by symptom

Use this table first. It saves a lot of trial and error.

PowerShell truncation fixes

Wide table is cut off in the console Use Format-Table -AutoSize -Wrap, or select fewer properties
Text file output is cut off Use Out-File -Width 300 or higher
Array/list property shows only a few values Set $FormatEnumerationLimit = -1 for the session
Need a clean report for Excel Use Select-Object and Export-Csv, not Format-Table
Need to inspect one object fully Use Format-List * or pipe to Get-Member first

Why PowerShell output gets truncated

PowerShell is not just printing plain text. Most cmdlets return objects with properties. When those objects reach the end of the pipeline, PowerShell chooses a default view: often a table for compact output, sometimes a list for detailed output.

Tables are the usual problem. A table has to fit into the current host width. If the object has several columns, PowerShell gives each column a slice of the available space. Long values are shortened so the table still lines up.

Run something like this and you may see columns trimmed:

Get-Process | Select-Object Name, Id, Path

The Path property can be much wider than the console window. PowerShell is trying to keep Name, Id, and Path in a readable table. The result is readable, but not complete.

Fix table output with Format-Table -Wrap and -AutoSize

The quickest console fix is Format-Table with -AutoSize and -Wrap.

Get-Process |
  Select-Object Name, Id, Path |
  Format-Table -AutoSize -Wrap

-AutoSize tells PowerShell to calculate column widths from the input instead of using the default layout. -Wrap lets long values continue onto the next line instead of being shortened.

This is useful for event logs, services, network adapters, processes, and anything else where the default table hides the value you need:

Get-EventLog -LogName Application -Newest 10 |
  Format-Table TimeGenerated, EntryType, Source, Message -AutoSize -Wrap

There is one trade-off: -AutoSize has to look at the input before it can size the columns. On a small command, that is fine. On thousands of objects, it can slow the first output because PowerShell waits to calculate the layout.

Select fewer properties when the table is too wide

Sometimes -Wrap is technically correct but ugly. If a table has eight columns and several long values, wrapping everything can turn a simple output into a wall of broken lines.

In that case, be stricter about the properties:

Get-Service |
  Select-Object Name, DisplayName, Status |
  Format-Table -AutoSize

For troubleshooting, the goal is not to show every property at once. The goal is to show the properties that answer the current question.

If you need to discover which properties are available, use:

Get-Service | Get-Member -MemberType Property

Then build the output you actually need.

Use Format-List for detailed inspection

Tables are good for comparing many objects. Lists are better for inspecting one or a few objects in detail.

For example, instead of squeezing service properties into a table, use a list:

Get-Service -Name Spooler | Format-List *

The * asks for all properties in the formatted list view. This is not always pretty, but it is often the fastest way to see whether a property exists and what value it has.

You can also list only the properties you care about:

Get-Service -Name Spooler |
  Format-List Name, DisplayName, Status, ServiceType, CanStop

This avoids horizontal truncation because each property gets its own line.

Fix collection truncation with FormatEnumerationLimit

Another kind of truncation happens when a property contains several values. PowerShell may show only the first few items and then hide the rest.

Check the current limit:

$FormatEnumerationLimit

The default is commonly 4. That means formatted output may show only the first four items from an enumerable property.

For the current session, set it to unlimited:

$FormatEnumerationLimit = -1

Now rerun the command that was hiding values.

Here is a simple example using dependent services:

Get-Service -Name RpcSs |
  Format-List Name, DisplayName, DependentServices

If DependentServices contains many entries, $FormatEnumerationLimit controls how many PowerShell shows in formatted output.

Stop text files from truncating with Out-File -Width

Out-File writes formatted output to a file. That is important: it receives objects, formats them, and writes the display representation. If the formatting width is too narrow, the file can contain truncated lines just like the console.

Use the -Width parameter:

Get-Process |
  Select-Object Name, Id, Path |
  Out-File -FilePath .\processes.txt -Width 300

For very wide output, use a larger width:

Get-EventLog -LogName Application -Newest 50 |
  Format-Table TimeGenerated, Source, Message -Wrap |
  Out-File -FilePath .\events.txt -Width 500

This is useful when you need a readable text report. It is not the best choice when another program needs to parse the data. For that, export structured data.

Use Export-Csv for real reports

If the output is going to Excel, a ticket attachment, an audit report, or another script, do not save formatted tables. Export the objects.

Good:

Get-Process |
  Select-Object Name, Id, CPU, Path |
  Export-Csv -Path .\processes.csv -NoTypeInformation

Avoid this:

Get-Process |
  Format-Table Name, Id, CPU, Path |
  Export-Csv -Path .\processes.csv -NoTypeInformation

The second command exports formatting metadata, not the original process object properties. It is one of those mistakes that looks harmless until you open the CSV and see strange columns instead of the data you expected.

For admin work, keep the rule simple:

  • Use Format-Table and Format-List for human display.
  • Use Select-Object to choose properties.
  • Use Export-Csv when you need structured output.
  • Use Out-File -Width when you need a wide text file.

Increase the console width when it helps

Sometimes the simplest fix is making the host wider. Windows Terminal, PowerShell 7, and the classic console all use the host width when formatting output.

If the window is narrow, table output gets squeezed. Maximize the window, drag it wider, or use Windows Terminal with a larger pane. This will not fix every case, but it often makes normal table output readable without extra formatting.

You can check the current buffer width:

$Host.UI.RawUI.BufferSize.Width

In an interactive session, changing the terminal width is usually easier than scripting the buffer size. For repeatable reports, prefer explicit commands like Out-File -Width.

A practical troubleshooting flow

When output looks truncated, work through it in this order.

PowerShell truncation checklist

  • Confirm whether the data is missing or only the display is shortened
  • Use Select-Object to reduce wide table columns
  • Use Format-Table -AutoSize -Wrap for console tables
  • Use Format-List for one object or detailed inspection
  • Set $FormatEnumerationLimit = -1 if collection values are shortened
  • Use Out-File -Width for wide text reports
  • Use Export-Csv for structured reports instead of formatted output

Here is a common example. You want to see services with their dependent services, but the output is hard to read:

Get-Service | Where-Object Name -like "*rpc*" | Format-List

Make the output more deliberate:

$FormatEnumerationLimit = -1

Get-Service |
  Where-Object Name -like "*rpc*" |
  Select-Object Name, DisplayName, Status, DependentServices |
  Format-List

Now you are showing only the useful properties, and PowerShell is allowed to display the full dependent service list.

Common mistakes to avoid

The most common mistake is formatting too early. Once you pipe to Format-Table or Format-List, you have told PowerShell, “I am done working with objects; show this to a human.” That is fine at the end of a pipeline. It is wrong in the middle of a data export.

Another mistake is using Out-File for data that should be CSV. Text output looks familiar, but it is fragile. If you need to sort, filter, import, or hand the file to someone using Excel, use Export-Csv.

Finally, do not set $FormatEnumerationLimit = -1 in a profile without thinking. It can make some formatted output very long. Set it when you need it, especially during troubleshooting, then leave your day-to-day shell predictable.

Wrapping up

Truncated PowerShell output is usually a formatting problem, not a data problem. For console tables, start with Format-Table -AutoSize -Wrap. For one object, use Format-List. For wide text files, use Out-File -Width. For real reports, skip formatting and export objects with Export-Csv.

Once you separate display formatting from object data, the whole issue becomes easier to handle. PowerShell is still giving you the information; you just need to choose the right output shape for the job.

Frequently asked questions

Why is my PowerShell output truncated?

PowerShell formats many objects for display before it writes them to the console. Wide tables are limited by the console or output width, so long values may be shortened with ellipses. Nested collections can also be shortened by the FormatEnumerationLimit preference variable.

What is the fastest fix for truncated table output?

Pipe the command to Format-Table with -AutoSize and -Wrap. AutoSize lets PowerShell calculate better column widths, and Wrap lets long values continue on another line instead of being cut off.

How do I stop PowerShell output being truncated in a text file?

Use Out-File with a larger -Width value, such as 300 or 500. If you need structured data for Excel or another tool, use Select-Object and Export-Csv instead of saving formatted table output.

Should I use Format-Table before Export-Csv?

No. Export-Csv should receive the original objects, not formatted table objects. Select the properties you want with Select-Object, then pipe those objects directly to Export-Csv.

What does FormatEnumerationLimit do?

FormatEnumerationLimit controls how many items PowerShell shows from an enumerable property when formatting output. Setting it to -1 in the current session shows all items, but it affects display formatting only, not the underlying object data.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.