Solved

How to see complete output of command on EMS ?

Posted on 2016-09-08
6
36 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
Comment Utility
You can try..

Get-MailboxPermission userid | FL

Or

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

Accepted Solution

by:
Qlemo earned 250 total points (awarded by participants)
Comment Utility
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 125 total points (awarded by participants)
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 14

Assisted Solution

by:Kaffiend
Kaffiend earned 125 total points (awarded by participants)
Comment Utility
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
Comment Utility
Thank you.
0
 
LVL 40

Expert Comment

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

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now