Applications Systems
Display of PowerShell output does not match console output
When using PowerShell in Server Configuration Monitor (SCM), the display of PowerShell output may be wrapped or may not match the console output. This KB article offers recommendations on how to resolve these issues.
First published date
Last published date
Overview
Product section
Cause
Resolution
If your PowerShell output contains extra white space or wraps unexpectedly, causing poor readability (as shown above), take the following steps:
- Add -AutoSize switch to all Format-Table calls (for instance, Get-Service | Format-Table -Property ServiceName, DisplayName, StartType -AutoSize).
- Use -Wrap to wrap text of last column if the console is still too narrow.