It’s been a little while since the last update to the Exchange Environment Report, and it’s a workhorse I use regularly in my work to (reasonably) quickly get a snapshot of important information about an Exchange org that’s easy to read.
I’ve got a list as long of my arm of updates to include, but I’ve been holding off partly because I’ve been busy, and also because Exchange 2013 and co-existence updates for 2007 & 2010 are nearly upon us (and no, I don’t know dates!)
However Neil Johnson has done a great job of adding in the necessary updates to allow the script to function correctly for Exchange 2013, including when it’s co-existing with previous versions. I’ve added a few minor changes myself and we’ve both tested it in our respective 2013 and 2010 environments (mine without co-existence). A big thank you to Neil for his efforts – especially as it’s re-ignited my interest in implementing additional features.
You can download the updated version of the script via the Exchange Environment Report page on my site, or direct from the Technet Gallery. Enjoy!
Excellent script ! Thank’s a lot.
Is there a known issue with Single DAG Exchange Environment. It seems like $DAG.Databases never populates.
Excellent script that I’ve been using for a while. Unfortunately, our migration to Exch 2013 broke it. I’m running the 2013 shell on a Windows 8 desktop and I get the following the two errors posted below. The end result is that the green “Totals” box at the top is correct, but all other values are zero or blank. Our DAG shows up with two members, but no servers are listed in the database list. Would love it if this is a quick and easy fix.
Errors:
The operation couldn’t be performed because object ‘LocalPC’ couldn’t be found on ‘dc.domain.loc’.
+ CategoryInfo : NotSpecified: (:) [Get-ExchangeServer], ManagementObjectNotFoundException
+ FullyQualifiedErrorId : [Server=SERVMAIL01,RequestId=0e3b71e6-ac8c-4dfd-917b-d8ff2d9f022e,TimeStamp=10/30/2013 7
:44:31 PM] A35CE822,Microsoft.Exchange.Management.SystemConfigurationTasks.GetExchangeServer
+ PSComputerName : servmail01.domain.loc
A parameter cannot be found that matches parameter name ‘IncludePreExchange2010’.
+ CategoryInfo : InvalidArgument: (:) [Get-MailboxDatabase], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Get-MailboxDatabase
+ PSComputerName : servmail01.domain.loc
Kind of fixed it… commented out lines 757-759 and added the $E2013=$true in an extra line. Those lines assume that the computer the script is running from is an Exchange server, which in my case causes the ManagementObjectNotFoundException error.
Hello, i’m getting error about schedule. When i scheduled it i’m getting “Incorrect function”.
i scheduled with this command;
.\Get-ExchangeEnvironmentReport.ps1 -HTMLReport C:\environment.html -SendMail:$true -MailFrom:administrator@xyz.com -MailTo:abc@cratospremium.com -MailServer:mail.xyz.com -ScheduleAs:xyz.com\administrator
first i run command its work and sent me mail. but when i run with task scheduler it’s getting me eroor. No any events….
LOVE THIS SCRIPT! Thanks, Steve!
I had to apply two minor modifications to accommodate our environment:
1) Exchange 2010 is installed on E:\ rather than C:\. I modified lines 726 and 728 to use the ExchangeInstallPath environment variable in place of the hard-coded path:
[726] if (Test-Path “${Env:ExchangeInstallPath}bin\RemoteExchange.ps1”)
[728] .${Env:ExchangeInstallPath}’bin\RemoteExchange.ps1′
2) We use mount points for Exchange 2010 database and log file locations. F:\ is a small volume to hold mount points for databases (e.g. F:\DB01\, F:\DB02\, etc.) and G:\ is a small volume to host mount points for log files (e.g. G:\TL01\, G:\TL02\, etc.). In this configuration the script would report 98.8% free space for ALL log file paths regardless of how full they were because it was picking up the root volume (G:\) rather than the volume mounted at the mount point (G:\TL01\).
I was able to show the correct free log disk space by modifying line 147 so that it matches properly on the mount point volume name rather than the volume that holds the mount point:
[147] if (($Database.LogFolderPath.PathName + “\”) -like $Disk.Name)
This worked for me; however, I’m not certain how this would behave if mount points were NOT being used…
Thanks again for a GREAT script!
Discovered I had the wrong line numbers for first modification when I went back to a freshly-downloaded v1.5.6 script! Should be lines 725 and 727. Oops.
Hello, wonderful script but when I run it I only get some of the info like total mailboxes, dont get any other stats on mailbox sizes etc. Its a simple 2010 exchange setup one server.
Anything else I shoul dbe doing?
You may need a bug fix if it’s just got one single database. Is that the case?
Getting an error when tying to run the scheduled task: C:\Get-ExchangeEnvironmentReport.ps1 : Cannot process argument transformation on parameter ‘SendMail’. Cannot convert
value “System.String” to type “System.Boolean”. Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or 0.
At line:1 char:83
+ … html -SendMail:True -MailFrom:
At Line: 1 char: 83 change “-SendMail:True” to “-SendMail:$true” and you’ll be good to go…
i have connect once but now cant connect anymore give error in username or password but those are right.
any service i sould restart?!
Is there any way for listing the version of Exchange 2013 to include the CU as well?
I’ll get it updated.
Wow cool script. Thanks!
Do you have a short way or idea how i can Output it to an Excel or convert it to a excel table, with your brilliant formattings?
Thanks
I have upgraded my environment to Exchange 2010 SP3….and the report detects it correctly on my cas/hub/mb servers, but still shows as SP2 on my Edge servers. Any idea on how to fix this?
The script isn’t at fault, the Service Pack doesn’t re-create the edge sync and thus retains the old SP version in domain-joined Exchange. To solve it across your environment (e.g. when you see it in the EMC) you’d need to remove and re-add the edge sync.
Is there a easy way to modify the script so that Drive space numbers are yellow at a certain percentage, and red at another percentage? In looking at the way the stuff is written to the HTML file, it doesn’t look like it, but thought I would ask.
Can we have a fix for those of us running Exchange 2010 SP3 without a DAG (or single database)….??
Thanks
What error do you see? I am using it on non-DAG without issues, I’ve not tried against an environment with just one database though, is that what you have?
Workaraound for Exchange 2010-SP3 with a single database: Add a second (empty) database
Hi,
i´m getting an error:
[PS] C:\>.\Get-ExchangeEnvironmentReport.ps1 -HTMLReprt C:\Ex-Report.html
Unexpected token ‘and’ in expression or statement.
At C:\Get-ExchangeEnvironmentReport.ps1:16 char:19
+ 2013, 2010 and <<<< to a lesser extent, 2007 and 2003, environment.
When i delete the comment in the script i get this:
Unable to find type [parameter(Position=0,Mandatory=$true,ValueFromPipeline=$fa
lse,HelpMessage='Filename to write HTML report to')]: make sure that the assembly containing this type is loaded.
At C:\Get-ExchangeEnvironmentReport.ps1:2 char:116
+ [parameter(Position=0,Mandatory=$true,ValueFromPipeline=$false,HelpMessage='Filename to write HTML report to')][ <<<< string]$HTMLReport,
Any Ideas?
Thanks, Christian
If you’re running this on Exchange 2007, you’ll need SP2 and above and PowerShell v2
Sorry, yes, we are using Exchange 2007 on Server 2003 R2.
Power Shell v2 > thats it!
Thanks for this great “tool”!
Christian
There is a little bug in v1.56: If only one mailbox database exists in Exchange 2010 SP3, none will be reported!
Just FYI, v1.5.6 doesn’t seem to detect Exchange 2007 UR10 properly, keeps reporting it as UR9. If I’m not mistaken, it’s comparing the version numbers as strings, not integers. The quick fix is to replace line 330…
if ($tRU -ge $RollupLevel) { $RollupLevel=$tRU; $RollupVersion=$tRUV }
with this…
if ([int]$tRU -ge $RollupLevel) { $RollupLevel=$tRU; $RollupVersion=$tRUV }
Seems to work for me, anyway.
Thanks!
Helped us with Exchange 2007 SP3 UR11 not being reported properly.
works nice, but if you have a testserver in the env with Services stopped it hangs. It would be nice if you can score, or exclude Servers. Even when it runs and hangs at one Server it would be nice to hit continue and it excludes this Server, rather thann cancel the script and re-run
What I need to do, to get it working in Win2003/Exch2003 environment? It only ends with error: “Exchange Management Shell cannot be loaded”.
Thanks.
There is no PowerShell in Exchange 2003 so this is sadly not for you. You would need to create a 2007 Box in the same organisation and then run against that.
Works like a charm!!! I’m wondering if you could add something for the mail queues, local disk space and public folders
Pingback: Exchange Environment Report v1.5.6 | Steve Goodman’s Exchange Blog « JC’s Blog-O-Gibberish
Pingback: Generate Exchange Environment Reports using Powershell