?
Solved

How to see complete output of command on EMS ?

Posted on 2016-09-08
6
Medium Priority
?
61 Views
Last Modified: 2016-10-04
I issued Get-MailboxPermission userid | ft
and got truncated columns displayed on the screen as follows:

Identity                         User                                  AccessRights            IsInherited Deny
--------                             ----                                     ------------                      -----------      ----
marketresearch.co... NT AUTHORITY\SELF    {FullAccess, Sen...        False          False
marketresearch.co... MARKETRESEARCH\ja... {FullAccess}                False          False
marketresearch.co... MARKETRESEARCH\cr... {FullAccess, Del...      False          False
marketresearch.co... MARKETRESEARCH\pwang {FullAccess, Del... False         False
marketresearch.co... MARKETRESEARCH\SH... {ReadPermission}    True          False
marketresearch.co... MARKETRESEARCH\Ex... {FullAccess}                True         True
marketresearch.co... 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?
0
Comment
Question by:Castlewood
6 Comments
 
LVL 40

Expert Comment

by:Subsun
ID: 41789852
You can try..

Get-MailboxPermission userid | FL

Or

Get-MailboxPermission userid | Export-csv c:\report.csv -nti
0
 
LVL 71

Accepted Solution

by:
Qlemo earned 1000 total points (awarded by participants)
ID: 41789857
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.
0
 
LVL 40

Assisted Solution

by:Subsun
Subsun earned 500 total points (awarded by participants)
ID: 41790007
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

0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
LVL 14

Assisted Solution

by:Kaffiend
Kaffiend earned 500 total points (awarded by participants)
ID: 41790257
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)
0
 

Author Comment

by:Castlewood
ID: 41800455
Thank you.
0
 
LVL 40

Expert Comment

by:Subsun
ID: 41827704
All the options provided by experts will help to view data from truncated columns.
0

Featured Post

A Cyber Security RX to Protect Your Organization

Join us on December 13th for a webinar to learn how medical providers can defend against malware with a cyber security "Rx" that supports a healthy technology adoption plan for every healthcare organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Loops Section Overview
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question