Solved

How to see complete output of command on EMS ?

Posted on 2016-09-08
6
47 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 69

Accepted Solution

by:
Qlemo earned 250 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 125 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 14

Assisted Solution

by:Kaffiend
Kaffiend earned 125 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
In this video we show how to create an email address policy 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 Mail Flow…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

839 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