Get-CorpEmailReport



righttop2014Ammar Hasayen @Email Organization Report Version 2.44/24/2014400001000002014Ammar Hasayen @Email Organization Report Version 2.44/24/2014left250002514600Get-CorpEmailReport v2.4.8900007300Get-CorpEmailReport v2.4.8Readme file for the new Email Organization Report, a PowerShell2679700317436500Script to collect and report Exchange Environments.The script uses some external functions from other authors.Copy rights are included inside the script code.Script Name: Get-CorpEmailReport.PS1Script Version: 2.4.8Author: Ammar HasayenDescription: Generate Exchange Organization Email Report Twitter: @ammarhasayenEmail: me@Paper Version: 2.0Get-CorpEmailReport.ps1 is an Email Organization Report and a great tool for IT Professionals who are working with Microsoft Exchange systems.This report will get organization wide information about your Email infrastructure, from Exchange servers O.S info, service health, up time details, beside Exchange and database highly aggregated information.Not only will you get a nice Dashboard describing your Exchange, you will get aggregated information about how much resources your email infrastructure is consuming in terms of server count, mailboxes and total storage.What you will get when running the script, is an overall overview about:Exchange Servers in your organization[Break down by AD Site][Info about External and Internal Web services names][Mailbox Count per AD Site]O.S versionO.S Service Pack level.Exchange Service health.Up time in days.Exchange Version.Exchange Service Level.Exchange Rollup Update Information.Exchange Role(s).Number of mailboxes in case of MBX role.Database Full Inventory[Break down by DAG][Separate Table for Recovery DBs][Separate Table for Non DAG DBs][Table per DAG]DB Name.Server Location.Mailbox Count.Average Mailbox Size.Archive Mailbox Count.Average Archive Mailbox Size.Mount Status.DB Size.Storage Group Name (Pre E2010).White Space.Circular Logging.DB Disk Free Percentage.Log Disk Free Percentage.Last Full Backup Date.Backed up Since (Days) – with customized thresholds.Quota Info: Prohibit Send.Quota Info: Prohibit Send and Receive.DB Activation Preference Check [Is it mounted on the preferred Server?].DB Copy Location and Activation Preference assignment.Mailbox Type Aggregated Data:User Mailbox Count.Shared Mailbox Count.Room Mailbox Count.Discovery Mailbox Count.Equipment Mailbox Count.Exchange Server Aggregated DataTotal Number of Exchange Servers break down byVersion.Role.Mailbox Aggregated Data[Overall Statistics for the Organization]Total Mailbox Count.Total Mailbox Size.Average Mailbox Size.Total Archive Count.Total Archive Size.Average Archive Size.Database Activation Preference Map Table[Table per DAG]List of all DAG DBsInformation about Database Copies for each rmation about Activation Preference for each Copy (MBX info).Total number of DB Mounted per DAG Server.Total number of DB Copies per DAG Server.Ideal number of DBs mounted per server using Activation Preference.Charts and DiagramsChart: DB Vs Mailbox Count.Chart: DB Vs Size in GB.Chart: DB Vs Backed Up Since (Days).Chart: Server Vs DB Count.Chart: Server Vs Mailbox Count.Script Filter Finally!![This has been for a long time a pending and requested feature]Filer by comma separated Exchange Servers.[Example: “Srv1, Srv2, Srv3...”]Filter by Expression.[Example: “*LON”][This will get all Exchange Servers with names ending with “LON”[Example: “UK*”][This will get all Exchange Servers with names started with “uk”Filter by list of DAG names[Example: “Dag1, Dag2,”[This will get all Exchange Servers member of those DAGs and will narrow the script scope to those DAGs only.Script Log Files[Used for logging script actions and steps taken]Information Log File.[Records script progress, actions, and gives you insights about what data being collected]Detail Log File.[Record detailed information for every single information detected for Exchange servers and databases. This can be used as inventory info]Error Log File[Records any termination errors along with all information about the error internal exception messages and commands failing with line number info]Totally new output screen when running the script interactively:New Time Watch to record the script execution time.Nested on screen progress bar to give you an idea about how long the script will run.On screen step by step statistics, so you can get quicker info while the script is running.Verbose Mode for advance detailed information on the screen.At the end of the script, couple of information will be displayed to list you the log files created with their location, and aggregate information and statistics about your Exchange Environment.Send Email option.PowerShell Remoting to get WMI Data [Totally New][New switch in the script to enable the use of PowerShell Remoting instead of RPC legacy calls. You can use this switch if you have enabled your Exchange servers for PS Remoting. The huge benefit for doing this, is simply security and reliability. The script in this mode will try to test WS-MAN connectivity and its version for each remote computer and then decide how to get WMI data. If for any reason PS remoting is not available on a remote computer, the script will fall back to legacy normal RPC calls to ensure reliability of getting the WMI data].Totally New Chart PowerShell Wrapper[The script is armed with totally new reliable Chart engine “code name: Get-CorpChart_Light” that will do smart calculation to change the chart dimensions and size depending on the number of input data. You will no longer get so crowded charts filled with letters that you cannot read. The chart engine will use a smart algorithm to calculate the best dimensions of the graph depending on the number of input data].Better Error and Exception Handling [Finally][The script uses complicated logic to track exception and errors, classifying them to categories, logging them to different log files using an internal function called “Write-CorpError”. After that, in most cases, the error will be logged, execution will continue without bothering you with on screen bad error messages. If the error affects the execution of the script, a nice and informative message will be displayed on the screen and log files with suggestions if possible to how to solve it].Works with all Exchange versions.[This was a limitation on the previous script that only worked with Exchange 2010. This version solves this limitation by supporting all versions of Exchange]Smart Dashboard HTML Table with customized thresholds. [You can configure couple of thresholds for DB Backup days and Server up time data, like how many days since the server restarted. When the threshold is crossed, the dashboard output HTML will color the affected cells, grapping your attention to what matters quickly.].Script divided into Modules with lots of regions[To better understand the code, the script is divided into the below modules to better organize and browse through the script code.Module 1 : Customization[Thresholds for you to customize]Module 2 : Functions[Script functions]Module 3 : Factory[Preparation tasks like creating log files and variable initialization]Module 4 : Process[Getting the data]Module 5 : Output[Outputting the data]Module 6 : Charts[Drawing the data]Module 7 : Final Tasks[Sending email and closing log files] Joined effort in writing the code. [Some of the script internal functionalities, specifically getting structured data part, is written by Steve Goodman, a Microsoft MVP at the time of writing this script. After communicating with Steve, who is a wonderful professional, his internal functions that gets structured internal data, are used as a base for writing the Process Module of the script. Big thanks to Steve on helping writing this module. I also used couple of helper functions from the online community like the Log Functions. Copyrights are mentions in the code.]Script ChartsWhat makes this script unique and outstanding, is the chart module. Nothing more exciting than parsing the output data in sorted nice looking charts.Four charts will be generated after running the script. Each chart is designed carefully to get the information that matters most to IT Professional. Chart Module is using a smart algorithm that will get information from your Exchange organization, digest it, and then decide what is the best way to output the chart depending on the number of data items. In this way, you will not get small crowded charts with hard to read data, instead, the graph dimensions will be scaled dynamically according to the number of items to draw. DB Activation Preference Table [New]Have you used the product team Exchange calculator where you input your data and a nice formatted table get generated for all your databases, and their copy status along with the activation preference? The script is intelligent enough to collect your DAG information, database copy locations, their activation preference, and then generate a similar live dashboard with a colored cell indicating a red alarm if a database is mounted on a non-preferred mailbox server.Aggregated DataThe script will also present a nicely formatted tables with aggregated information like the mailboxes per type, Exchange servers per role and version, and also mailbox and archives count, sizes and average size.Detailed information for Servers and DatabasesOf course the script will not be perfect if a detailed information is not presented. The script will start creating HTML tables for all your Exchange servers with all detailed information, including version, OS Info, Rollup Updates version, Service health, Up Time information and more.Also, for each database, you will get a detailed information about the database and all its properties with smart thresholds that you can customize. Copy RightsThe script is based on Steve Goodman, a Microsoft MVP at the time of writing this document. Steve Script: “Generate Exchange Environment Reports using PowerShell” Version 1.5.8, 2nd Feb 2014, is used heavily as a foundation to build this script. Steve worked hardly in writing an outstanding script to collect information from all versions of Exchange servers, and get a nicely formatted output. This script extends Steve’s script functionalities by adding a lot of functionalities like: new on screen progress, charts, HTML DB Activation output, PowerShell Remoting module, Log files tracking, more aggregated data, new table for Mailbox type, new table for Recovery Databases, threshold options, two new Filter functionalities (by DAG names, and by Server names), new module for error handling and logging, more data collected for Exchange and Databases.A separate communication with Steve has been done to ensure copy rights before releasing this extended script. I encourage you to visit his blog and browse his script: ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download