{"id":15461,"date":"2011-02-28T00:01:00","date_gmt":"2011-02-28T00:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2011\/02\/28\/use-powershell-to-create-an-exchange-2010-database-report\/"},"modified":"2011-02-28T00:01:00","modified_gmt":"2011-02-28T00:01:00","slug":"use-powershell-to-create-an-exchange-2010-database-report","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/use-powershell-to-create-an-exchange-2010-database-report\/","title":{"rendered":"Use PowerShell to Create an Exchange 2010 Database Report"},"content":{"rendered":"<p><b>Summary<\/b>: Learn how to use Windows PowerShell to create an HTML report of Exchange 2010 databases <a>by using <\/a>conditional formatting and thresholds.<\/p>\n<p><img decoding=\"async\" height=\"34\" width=\"34\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" align=\"left\" alt=\"Hey, Scripting Guy! Question\" border=\"0\" title=\"Hey, Scripting Guy! Question\" \/><\/p>\n<p>&nbsp; Hey, Scripting Guy! I need to learn how to produce reports on my Exchange 2010 databases. Is this something that I can do by using Windows PowerShell?<\/p>\n<p>&mdash;TH<\/p>\n<p><img decoding=\"async\" height=\"34\" width=\"34\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" align=\"left\" alt=\"Hey, Scripting Guy! Answer\" border=\"0\" title=\"Hey, Scripting Guy! Answer\" \/> Hello TH, <\/p>\n<p>Microsoft Scripting Guy, Ed Wilson, here. It is time for a Guest Blogger Week. You will love the lineup we have this week. Today our guest is Thiyagu.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/2538.HSG-2-28-11-01_26ACF63B.jpg\"><img decoding=\"async\" height=\"468\" width=\"404\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/4188.HSG-2-28-11-01_thumb_17496E5F.jpg\" alt=\"Image of Thiyagu\" border=\"0\" title=\"Image of Thiyagu\" style=\"border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px\" \/><\/a><\/p>\n<p>Here is what Thiyagu has to say about himself:<\/p>\n<blockquote>\n<p>I work for a large investment bank as an Exchange administrator. I have been scripting for more than seven years. I am good at VBScript, but when I first laid my eyes on Windows PowerShell, I realized this is the coolest thing ever in scripting. I automate nearly all of my Exchange and Active Directory tasks. I am also good at WMI, ADSI, and generating reports. I write a blog at <a target=\"_blank\" href=\"http:\/\/www.myExchangeWorld.com\">www.myExchangeWorld.com<\/a>. I have developed custom apps in C# for automation. I love to automate things. Scripting and Exchange Server are really my passions. <\/p>\n<\/blockquote>\n<p>Today I want to show you how to get a colorful report for your daily export jobs or any important reports that you might be running.<\/p>\n<p>Who likes raw data such as the output seen in the following image? OK, maybe administrators (like me) like it, but this is not something that you can give to your boss. <\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/0407.HSG-2-28-11-02_601FE065.jpg\"><img decoding=\"async\" height=\"166\" width=\"604\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/6170.HSG-2-28-11-02_thumb_7E1DEE59.jpg\" alt=\"Image of raw data\" border=\"0\" title=\"Image of raw data\" style=\"border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px\" \/><\/a><\/p>\n<p>Yeah, it looks nice if you play around with it; but when you want to produce a nice report, it does not work very well. That&rsquo;s what I want to show you today&mdash;how to produce a better report. <\/p>\n<p>Displaying output is one of the skills in the <a target=\"_blank\" href=\"http:\/\/blogs.technet.comhttps:\/\/devblogs.microsoft.com\/scripting\/2011-scripting-games-all-links-on-one-page\/\">2011 Scripting Games<\/a>. Thiyagu&rsquo;s information will be useful study material for those who are contemplating entering this year&rsquo;s event. Other areas of concentration are detailed in the <a target=\"_blank\" href=\"http:\/\/blogs.technet.com\/b\/heyscriptingguy\/archive\/2011\/02\/11\/2011-scripting-games-study-guide.aspx\">2011 Scripting Games Study Guide<\/a>.<\/p>\n<p>Most you might already be thinking, &ldquo;Well, there is my little friend called &ldquo;Convertto-HTML,&rdquo; and then I have my nice little HTML report (see the following image).&rdquo; To be honest, I don&rsquo;t like &ldquo;Convertto-HTML&rdquo; that much.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/4213.HSG-2-28-11-03_3C37090B.jpg\"><img decoding=\"async\" height=\"382\" width=\"404\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1300.HSG-2-28-11-03_thumb_6F269972.jpg\" alt=\"Image of HTML table\" border=\"0\" title=\"Image of HTML table\" style=\"border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px\" \/><\/a><\/p>\n<p>I don&rsquo;t like the Times New Roman font J&hellip;maybe it&rsquo;s just me (sorry if I offended any Times New Roman font lovers). Refer to this <a target=\"_blank\" href=\"http:\/\/technet.microsoft.com\/en-us\/library\/ff730936.aspx\">PowerShell Tip of the Week<\/a> for discussion about customizing the <b>Convertto-Html<\/b> cmdlet. Keep in mind that in Windows PowerShell 2.0, the power of the cmdlet has expanded significantly. <\/p>\n<p>I like to have more control over those HTML tags, and I want to customize them per our needs.<\/p>\n<p>What I am planning to do is to write a script that will generate an HTML report about your Exchange databases and run through the following preconfigured thresholds:<\/p>\n<p>&middot; Database Size<\/p>\n<p>&middot; Mailbox Count<\/p>\n<p>&middot; Top Mailbox Size<\/p>\n<p>&middot; Backup Days<\/p>\n<p>If any of these thresholds is exceeded, it will be marked with red in your HTML report.<\/p>\n<p>This way, just by glancing at your report, you will know where your problems are. You can see the different thresholds that I setup here.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8836.HSG-2-28-11-04_0D24A767.jpg\"><img decoding=\"async\" height=\"181\" width=\"404\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1300.HSG-2-28-11-04_thumb_0B07A89E.jpg\" alt=\"Image of report\" border=\"0\" title=\"Image of report\" style=\"border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px\" \/><\/a><\/p>\n<p>You can tweak them to suit the needs of your environment.<\/p>\n<p>After this, what I have to do is to create a file, and then add an HTML header with head, body, and style tags.<\/p>\n<p>It might look scary, but it is not&mdash;please don&rsquo;t lose heart J because you don&rsquo;t really have to fully understand this. This is just information that you need in the HTML file for the colors and fonts. I welcome anyone who want to learn it to give it a try&hellip;it is really easy.<\/p>\n<blockquote>\n<p>Function writeHtmlHeader<\/p>\n<p>{<\/p>\n<p>param($fileName)<\/p>\n<p>$date = ( <b>Get-Date<\/b> ).ToString(&#8216;yyyy\/MM\/dd&#8217;)<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;html&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;head&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;meta http-equiv=&#8217;Content-Type&#8217; content=&#8217;text\/html; charset=iso-8859-1&#8242;&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8216;&lt;title&gt;myExchangeWorld.COM Database Report&lt;\/title&gt;&#8217;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8216;&lt;STYLE TYPE=&#8221;text\/css&#8221;&gt;&#8217;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;!&#8211;&#8220;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;td {&#8220;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;font-family: Tahoma;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;font-size: 11px;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;border-top: 1px solid #999999;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;border-right: 1px solid #999999;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;border-bottom: 1px solid #999999;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;border-left: 1px solid #999999;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;padding-top: 0px;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;padding-right: 0px;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;padding-bottom: 0px;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;padding-left: 0px;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;}&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;body {&#8220;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;margin-left: 5px;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;margin-top: 5px;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;margin-right: 0px;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;margin-bottom: 10px;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;table {&#8220;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;border: thin solid #000000;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;}&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&#8211;&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;\/style&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;\/head&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;body&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;table width=&#8217;100%&#8217;&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;tr bgcolor=&#8217;#CCCCCC&#8217;&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;td colspan=&#8217;7&#8242; height=&#8217;25&#8217; align=&#8217;center&#8217;&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;font face=&#8217;tahoma&#8217; color=&#8217;#003399&#8242; size=&#8217;4&#8242;&gt;&lt;strong&gt;myExchangeWorld.COM Database Report &#8211; $date&lt;\/strong&gt;&lt;\/font&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;\/td&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;\/tr&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;\/table&gt;&#8221;<\/p>\n<p>}<\/p>\n<\/blockquote>\n<p>I put in some normal HTML headers, and then I created a style with all the custom table properties like color, font, and size.<\/p>\n<p>When that is done, we simply create a new table structure and put in all the table headers, like the database name and size.<\/p>\n<blockquote>\n<p>Function writeTableHeader<\/p>\n<p>{<\/p>\n<p>param($fileName)<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;table width=&#8217;100%&#8217;&gt;&lt;tbody&gt;&#8221; <\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;tr bgcolor=#CCCCCC&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;td width=&#8217;10%&#8217; align=&#8217;center&#8217;&gt;Database Name&lt;\/td&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;td width=&#8217;10%&#8217; align=&#8217;center&#8217;&gt;Server&lt;\/td&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;td width=&#8217;15%&#8217; align=&#8217;center&#8217;&gt;Database File&lt;\/td&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;td width=&#8217;10%&#8217; align=&#8217;center&#8217;&gt;Database Size(MB)&lt;\/td&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;td width=&#8217;7%&#8217; align=&#8217;center&#8217;&gt;# of Mailboxes&lt;\/td&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;td width=&#8217;10%&#8217; align=&#8217;center&#8217;&gt;WhiteSpace(MB)&lt;\/td&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;td width=&#8217;10%&#8217; align=&#8217;center&#8217;&gt;Top Mailbox&lt;\/td&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;td width=&#8217;10%&#8217; align=&#8217;center&#8217;&gt;Top Mailbox Size&lt;\/td&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;td width=&#8217;10%&#8217; align=&#8217;center&#8217;&gt;Last Full Backup&lt;\/td&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;td width=&#8217;15%&#8217; align=&#8217;center&#8217;&gt;No Backup Since?&lt;\/td&gt;&#8221;<\/p>\n<p><b>Add-Content<\/b> $fileName &#8220;&lt;\/tr&gt;&#8221;<\/p>\n<p>}<\/p>\n<\/blockquote>\n<p><b>Quick tip: <\/b>&lt;TR&gt; tags mean table row, and &lt;TD&gt; is table data or the actual cell.<\/p>\n<p>Let&rsquo;s analyze one line from the previous code.<\/p>\n<blockquote>\n<p>&#8220;&lt;td width=&#8217;10%&#8217; align=&#8217;center&#8217;&gt;Database Name&lt;\/td&gt;&#8221;<\/p>\n<\/blockquote>\n<p>What that exactly translates to is: Make this cell width 10%, center align the text, and the text inside the cell is Database Name.<\/p>\n<p>After we have written all the table headers, we can get the actual data from the servers, then build HTML tags and add them to the HTML file.<\/p>\n<p>Following is the function that calculates all the required data and then sends the information for HTML processing.<\/p>\n<blockquote>\n<p>Function get-DBInfo<\/p>\n<p>{<\/p>\n<p>$dbs = Get-MailboxDatabase -Status<\/p>\n<p>foreach($db in $dbs)<\/p>\n<p>{<\/p>\n<p>$name = $db.name<\/p>\n<p>$svr = $db.servername<\/p>\n<p>$edb = $db.edbfilepath<\/p>\n<p>$edbSize = $db.DatabaseSize.Tobytes()<\/p>\n<p>$whiteSpace = $db.AvailableNewMailboxSpace.Tobytes()\/1mb<\/p>\n<p>$mbxCount = (Get-Mailbox -Database $db).count<\/p>\n<p>$topMailbox = Get-Mailbox -Database $db | Get-MailboxStatistics | <b>Sort-Object<\/b> TotalItemSize <i>-Descending<\/i> |<b>Select-Object<\/b> DisplayName <i>-First<\/i> 1 | <b>Format-Table<\/b> Displayname <i>-HideTableHeaders<\/i> | <b>Out-String<\/b><\/p>\n<p>$topMailboxSize = Get-Mailbox -Database $db| Get-MailboxStatistics | <b>Sort-Object<\/b> TotalItemSize <i>-Descending<\/i> | <b>Select-Object<\/b> totalitemsize <i>-First<\/i> 1<\/p>\n<p>$topMailboxSize = $topMailboxSize.TotalItemSize.Value.ToBytes()<\/p>\n<p>$lastBackup = $db.LastFullBackup; $currentDate = <b>Get-Date<\/b><\/p>\n<p>if ($lastBackup -eq $null)<\/p>\n<p>{<\/p>\n<p>$howOldBkp = $null<\/p>\n<p>}<\/p>\n<p>else<\/p>\n<p>{<\/p>\n<p>$howOldBkp = $currentDate &#8211; $lastBackup<\/p>\n<p>$howOldBkp = $howOldBkp.days<\/p>\n<p>}<\/p>\n<p><b>writedata<\/b> $name $svr $edb $edbSize $whiteSpace $mbxCount $topMailbox $topMailboxSize $lastBackup $howOldBkp<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<\/blockquote>\n<p>The previous function is self-explanatory&mdash;I loop through all databases and calculate the required information. Then in the last line, I send the values to another function called <b>writeData<\/b> as shown here.<\/p>\n<blockquote>\n<p>Function WriteData<\/p>\n<p>{<\/p>\n<p>param($name,$svr,$edb,$edbSize,$whiteSpace,$mbxCount,$topMailbox,$topMailboxSize,$lastBackup,$howOldBkp)<\/p>\n<p>$tableEntry = &#8220;&lt;tr&gt;&lt;td&gt;$name&lt;\/td&gt;&lt;td&gt;$svr&lt;\/td&gt;&lt;td&gt;$edb&lt;\/td&gt;&#8221;<\/p>\n<p>#Checking if EDB size is greater than the set Threshold<\/p>\n<p>#If it is greater than the table cell will be marked red, else green.<\/p>\n<p>if ($edbSize -gt $dbSizeThreshold)<\/p>\n<p>{<\/p>\n<p>$edbSize = $edbSize\/1mb<\/p>\n<p>$tableEntry += &#8220;&lt;td bgcolor=&#8217;#FF0000&#8242; align=center&gt;$edbSize&lt;\/td&gt;&#8221;<\/p>\n<p>}<\/p>\n<p>else<\/p>\n<p>{<\/p>\n<p>$edbSize = $edbSize\/1mb<\/p>\n<p>$tableEntry += &#8220;&lt;td bgcolor=&#8217;#387C44&#8242; align=center&gt;$edbSize&lt;\/td&gt;&#8221;<\/p>\n<p>}<\/p>\n<p><b>Add-Content<\/b> $fileName $tableEntry<\/p>\n<p><b>Write-Host<\/b> $tableEntry<\/p>\n<p>} <\/p>\n<\/blockquote>\n<p>Actually, I could add more to that function; I limited the information to show one item where I perform a comparison. If you notice, this comparison is for checking <b>edbSize<\/b>. I am using a simple condition to check if the size is greater than a particular threshold.<\/p>\n<p>If the value is greater, the <b>bgcolor<\/b> property of the tag changes to red; otherwise, it is going to be green.<\/p>\n<p>I guess you are now getting the gist of it. <\/p>\n<p>After all the conditions are checked, all those HTML tags are stored in the variable <b>$tableEntry<\/b> and then written to the HTML file.<\/p>\n<p>Finally, I use a simple <b>sendEmail <\/b>function to email the report.<\/p>\n<p><b>Note: <\/b>I set the <b>Bodyhtml<\/b> property to <b>true<\/b> in the code.<b><\/b><\/p>\n<blockquote>\n<p>Function sendEmail<\/p>\n<p>{ param($from,$to,$subject,$smtphost,$htmlFileName)<\/p>\n<p>$body = <b>Get-Content<\/b> $htmlFileName<\/p>\n<p>$smtp= <b>New-Object<\/b> System.Net.Mail.SmtpClient $smtphost<\/p>\n<p>$msg = <b>New-Object<\/b> System.Net.Mail.MailMessage $from, $to, $subject, $body<\/p>\n<p>$msg.isBodyhtml = $true<\/p>\n<p>$smtp.send($msg)<\/p>\n<p>}<\/p>\n<\/blockquote>\n<p>Here is an image of the report the way I like to see it in my environment&mdash;all green!<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8322.HSG-2-28-11-05_342F40DC.jpg\"><img decoding=\"async\" height=\"116\" width=\"604\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8357.HSG-2-28-11-05_thumb_6B291F15.jpg\" alt=\"Image of report\" border=\"0\" title=\"Image of report\" style=\"border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px\" \/><\/a><\/p>\n<p>In the following image, you can see where some of the thresholds have been crossed, and therefore the field changes to red. <\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/8666.HSG-2-28-11-06_64959F85.jpg\"><img decoding=\"async\" height=\"116\" width=\"604\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/1488.HSG-2-28-11-06_thumb_348B4E04.jpg\" alt=\"Image of report\" border=\"0\" title=\"Image of report\" style=\"border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px\" \/><\/a><\/p>\n<p>Because the report is HTML, I do not need to save the report to a file and then open it in Internet Explorer. I can read it directly in the email. The report as it appears in my Inbox is shown here.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/5611.HSG-2-28-11-07_1253427E.jpg\"><img decoding=\"async\" height=\"329\" width=\"604\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/0456.HSG-2-28-11-07_thumb_50002A3A.jpg\" alt=\"Image of report\" border=\"0\" title=\"Image of report\" style=\"border-bottom: 0px;border-left: 0px;padding-left: 0px;padding-right: 0px;border-top: 0px;border-right: 0px;padding-top: 0px\" \/><\/a><\/p>\n<p>The complete script is located in the Scripting Guys <a target=\"_blank\" href=\"http:\/\/gallery.technet.microsoft.com\/scriptcenter\/d9af4a66-a908-4a3f-af10-380aa63c3a74\">Script Repository<\/a>. <\/p>\n<p>TH, that is all there is to use Windows PowerShell to generate Exchange database reports. Thank you, Thiyagu, for taking the time to share your knowledge and your script with us. Guest Blogger Week will continue tomorrow when Microsoft MVP, Shay Levy, will be our guest. <\/p>\n<p>I invite you to follow me on <a target=\"_blank\" href=\"http:\/\/bit.ly\/scriptingguystwitter\">Twitter<\/a> and <a target=\"_blank\" href=\"http:\/\/bit.ly\/scriptingguysfacebook\">Facebook<\/a>. If you have any questions, send email to me at <a href=\"mailto:scripter@microsoft.com\">scripter@microsoft.com<\/a>, or post your questions on the <a target=\"_blank\" href=\"http:\/\/bit.ly\/scriptingforum\">Official Scripting Guys Forum<\/a>. See you tomorrow. Until then, peace.<\/p>\n<p><b>Ed Wilson, Microsoft Scripting Guy<\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Summary: Learn how to use Windows PowerShell to create an HTML report of Exchange 2010 databases by using conditional formatting and thresholds. &nbsp; Hey, Scripting Guy! I need to learn how to produce reports on my Exchange 2010 databases. Is this something that I can do by using Windows PowerShell? &mdash;TH Hello TH, Microsoft Scripting [&hellip;]<\/p>\n","protected":false},"author":595,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25,56,28,180,3,4,225,45],"class_list":["post-15461","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-displaying-output","tag-guest-blogger","tag-messaging-and-communication","tag-microsoft-exchange-2010","tag-scripting-guy","tag-scripting-techniques","tag-thiyagu","tag-windows-powershell"],"acf":[],"blog_post_summary":"<p>Summary: Learn how to use Windows PowerShell to create an HTML report of Exchange 2010 databases by using conditional formatting and thresholds. &nbsp; Hey, Scripting Guy! I need to learn how to produce reports on my Exchange 2010 databases. Is this something that I can do by using Windows PowerShell? &mdash;TH Hello TH, Microsoft Scripting [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/15461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/595"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=15461"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/15461\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=15461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=15461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=15461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}