Monday, 10 August 2015

Powershell - Formatting output of powershell

While running powershell commands, sometimes output is displayed partially with '...'.


In order to display the output fully, use ft -AutoSize as below

get-service | ft -AutoSize


But if the length of string is too big, even ft -Autosize results output with '...'. To fix it, use below width parameter of out-string 
get-service | ft -AutoSize | Out-String -Width 4096