PowerShell: Prevent Truncating Lines, Wrap Lines

By Xah Lee. Date: . Last updated: .

PowerShell is very annoying. It truncates file paths if your terminal is not wide enough.

Here's how to make it soft-wrap lines instead.

# list file, show full path
dir -recurse | ForEach-Object {$_.fullname}
dir -recurse | select -property fullname | Format-List

there is no simple way to make any output not truncate.

you can work around by Piping things to Format-List to make paths not truncate.

PowerShell

Practical How-To

list files

list dirs

on dir

on file

Windows config

misc


PowerShell in Depth

Programing PowerShell

Value Types

String

Variable

Boolean

Conditional

Data Structure

Loop and Iteration

Input/Output

Function

Profile and Script

Script Examples