Monday, May 8, 2017

Display complete result in PowerShell instead of dots

By default, when there is not enough space in the console window, PowerShell automatically cuts off parts of result columns and shows incomplete results:

So PowerShell trim the result by .. like shown below.

PS> Get–Help –Name Service

Name                              Category  Module                    Synopsis
––––                              ––––––––  ––––––                    ––––––––
Get–Service                       Cmdlet    Microsoft.PowerShell.M... Gets t...
New–Service                       Cmdlet    Microsoft.PowerShell.M... Create...
New–WebServiceProxy               Cmdlet    Microsoft.PowerShell.M... Create...
Restart–Service                   Cmdlet    Microsoft.PowerShell.M... Stops ...
Resume–Service                    Cmdlet    Microsoft.PowerShell.M... Resume...
Set–Service                       Cmdlet    Microsoft.PowerShell.M... Starts...
Start–Service                     Cmdlet    Microsoft.PowerShell.M... Starts...
Stop–Service                      Cmdlet    Microsoft.PowerShell.M... Stops ...
Suspend–Service                   Cmdlet    Microsoft.PowerShell.M... Suspen...
Connect–QADService                Cmdlet    QuestAD                   Connec...

To display everything instead of trim result.

PS> Get-Help -Name Service | Out-GridView -Title 'the results are in'

also we can display result with wrap text by following command.

PS> Get-Help -Name Service | Format-Table -Wrap

Share:

0 comments:

Post a Comment