How to see complete output of command on EMS ?

I issued Get-MailboxPermission userid | ft
and got truncated columns displayed on the screen as follows:

Identity                         User                                  AccessRights            IsInherited Deny
--------                             ----                                     ------------                      -----------      ---- NT AUTHORITY\SELF    {FullAccess, Sen...        False          False MARKETRESEARCH\ja... {FullAccess}                False          False MARKETRESEARCH\cr... {FullAccess, Del...      False          False MARKETRESEARCH\pwang {FullAccess, Del... False         False MARKETRESEARCH\SH... {ReadPermission}    True          False MARKETRESEARCH\Ex... {FullAccess}                True         True MARKETRESEARCH\Do... {FullAccess}                True        True

So I thought I can pipe the output to a file in a hope to see the complete columns. Unfortunately the piped file is in the exactly same content as on the screen. Can you tell me how to see the complete content?
Who is Participating?
QlemoConnect With a Mentor Batchelor, Developer and EE Topic AdvisorCommented:
For screen output you can (always) try ft -auto to auto-adjust column widths. That improves results, but is no complete solution where the screen width is just too low. It should work here, however.

You should never pipe ft output into a file, unless for displaying purposes. There is a lot of formatting going on in the background, making results usually useless for files. As said, it is thought to be used on screen only.

You can also use | Out-GridView to get a GUI table display.
You can try..

Get-MailboxPermission userid | FL


Get-MailboxPermission userid | Export-csv c:\report.csv -nti
SubsunConnect With a Mentor Commented:
Also you can also export  selective properties..
Example, to export just user names and AccessRights..
Get-MailboxPermission userid | Select User,{$_.AccessRights} | Export-csv c:\report.csv -nti

Open in new window

Worried about phishing attacks?

90% of attacks start with a phish. It’s critical that IT admins and MSSPs have the right security in place to protect their end users from these phishing attacks. Check out our latest feature brief for tips and tricks to keep your employees off a hackers line!

KaffiendConnect With a Mentor Commented:
Get-MailboxPermission userid | ft -autosize | out-string -width 250 > c:\output.csv

(As QLemo said,) ft stops the shell from truncating fields
out-string - the default shell contains only 80 columns so in case the output is over 80 characters total per line, we need to up the limit (the number 250 is arbitrary, you can use whatever value works)
CastlewoodAuthor Commented:
Thank you.
All the options provided by experts will help to view data from truncated columns.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.