Exchange-PowerShell formatted output information

Source: Internet
Author: User

How do we export the information we need to be in the format we want, this section, which focuses on formatting output results

can use format-list commands are displayed in columnar format

Get-mailbox Robin.pang | Format-list

You can also enter a table style for the result

Get-mailbox Robin.pang | Format-table Name,alias

650) this.width=650; "title=" 01.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/58/FE/ Wkiol1tdybttejamaacatv6b-_q156.jpg "alt=" Wkiol1tdybttejamaacatv6b-_q156.jpg "/>

I can use it. AutoSize parameter makes the data in the table adaptive width

Get-mailbox San.zhang | Format-table name,alias–autosize

650) this.width=650; "title=" 02.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M01/59/01/ Wkiom1tdxzmt9sfzaab0ocbkqxy098.jpg "alt=" Wkiom1tdxzmt9sfzaab0ocbkqxy098.jpg "/>

In the above command, I can use FL Replace format-list , ft Replace format-table

650) this.width=650; "title=" 03.png "style=" Float:none; "src=" http://s3.51cto.com/wyfs02/M02/58/FE/ Wkiol1tdybsiqzuxaabrimjtvby344.jpg "alt=" Wkiol1tdybsiqzuxaabrimjtvby344.jpg "/>

More commands:

Output structure to text

Get-mailbox Robin.pang | FL * | Out-file C:\test.txt

in the above command, we can also use the command " > " or ">>" Making text Output

Get-mailboxdatabase | Sort name | FT name

Get-mailboxdatabase | Sort Name–desc | FT name

This article from "Robin's Home" blog, declined reprint!

Exchange-PowerShell formatted output information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.