IT tutorials
 
Applications Server
 

Managing Exchange Server 2010 : The Exchange Management Shell (part 3) - Reporting with the Exchange Management Shell

12/20/2012 11:29:09 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

5 Reporting with the Exchange Management Shell

The Exchange Management Shell can actually be very effectively used for creating reports. The EMS has quite a lot of powerful cmdlets, and with the pipelining option it is possible to create all kinds of reporting. I'll give you a few examples, although please bear in mind that the outputs for many of these examples have been edited for readability.

The Get-ExchangeServer cmdlet will return a list of all Exchange 2010 servers in the organization:



[Edited for readability]

With the –Identity option it is possible to retrieve the information for only one Exchange server, and when the Get-ExchangeServer cmdlet is used in a pipeline with the format-list command, all the detailed information for the server in question is shown:





[Edited for readability]

If you want to retrieve mailbox information from your Exchange server, the Get-Mailbox and Get-MailboxStatistics cmdlets can be used:





[Edited for readability]

To get detailed information about a particular mailbox, the output of that Mailbox's identity can be piped to the Format-List command:





[Edited for readability]

The Get-MailboxStatistics cmdlet retrieves detailed information about Mailbox usage from an Exchange Server:



[Edited for readability]

So the Get-MailboxStatistics cmdlet gives lots of information about usage. To get some real reporting information, PowerShell has an option to convert its output to HTML. So, when you enter the following command...



... nothing is logged to the screen, but an HTML file is created in the directory where the PowerShell is running. Use Internet Explorer to open the output file:

Figure 4. Output of the Get-MailboxStatistics cmdlet redirected to an HTML file.

Using just the DisplayName is not really useful, so let's add some more parameters:



This will give the following HMTL file:

Figure 5. Detailed information about mailbox usage redirected to an HTML file.

Much nicer!

NOTE

If you're enjoying pipelining, it's also possible to use the PowerShell Out-File option instead of redirecting using the ">".

Now let's create a small script with some variables:

  • $Now contains the date and time the script runs.

  • $BodyStyle contains a value used to retrieve a stylesheet to customize the HMTL file.

  • $MBXOutput contains the actual output from the Get-MailboxStatistics cmdlet.

Your script should look something like this:





Save this file as reporting.ps1 and run the script. It will still show the output of the query, but now it'll be beautifully formatted according the CSS style sheet. This methodology will allow you to create some really cool custom reporting setups.

 
Others
 
- Managing Exchange Server 2010 : The Exchange Management Shell (part 2) - Remote PowerShell
- Managing Exchange Server 2010 : The Exchange Management Shell (part 1) - Pipelining, Bulk user creation in the Exchange Management Shell
- Installing Exchange Server 2010 into an existing Exchange Server 2007 environment
- Microsoft Dynamics CRM 2010 : Editing Dashboards
- Microsoft Dynamics CRM 2010 : Creating Additional Dashboards
- Exposing Hidden Features in Microsoft Dynamics GP 2010 : Gaining the option to Process Taxes in the General Ledger
- Exposing Hidden Features in Microsoft Dynamics GP 2010 : Improving information with Tax Dates in transactions
- Exposing Hidden Features in Microsoft Dynamics GP 2010 : Controlling Posting Dates when not posting by batch, Reducing posting steps with better Printing Control
- Using Windows Azure WCF Services in SharePoint and Office : WCF Services in Windows Azure and Excel Services
- Using Windows Azure WCF Services in SharePoint and Office : Map an External Content Type to Word 2010
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us