Skip to content
Permalink
Browse files

Merge remote-tracking branch 'refs/remotes/origin/development' into I…

…ssue-165-IMAP-Rewrite
  • Loading branch information...
cunninghamp committed May 18, 2017
2 parents 8e136cc + 2cf11d0 commit bc293d3fa4b1eafe0b6fa7786cd108fd848087a8
BIN +6.54 KB (110%) Data/ExchangeBuildNumbers.xml
Binary file not shown.
@@ -0,0 +1,7 @@
"ExchangeDescription",".NET Framework 4.6.2",".NET Framework 4.6.1",".NET Framework 4.5.2",".NET Framework 4.5.1",".NET Framework 4.5"
"Exchange Server 2016 CU5","Supported","Not supported","Not supported","Not supported","Not supported"
"Exchange Server 2016 CU4","Supported","Supported","Supported","Not supported","Not supported"
"Exchange Server 2016 CU3","Supported","Supported","Supported","Not supported","Not supported"
"Exchange Server 2013 CU16","Supported","Not supported","Not supported","Not supported","Not supported"
"Exchange Server 2013 CU15","Supported","Supported","Supported","Supported","Not supported"
"Exchange Server 2013 CU14","Not supported","Supported","Supported","Supported","Supported"
@@ -26,12 +26,12 @@
<Test>
<Id>EXSRV003</Id>
<Category>Exchange Servers</Category>
<Name>.NET Framework Version</Name>
<Description>Check if Exchange Servers are running a supported and recommended version of the .NET Framework.</Description>
<Name>.NET Framework Versions</Name>
<Description>Check if Exchange Servers are running the a supported version of .NET Framework.</Description>
<IfInfoComments></IfInfoComments>
<IfPassedComments>All Exchange servers are running supported versions of the .NET Framework.</IfPassedComments>
<IfWarningComments>One or more Exchange servers are not running the recommended version of the .NET Framework.</IfWarningComments>
<IfFailedComments>One or more Exchange servers are not running a supported version of the .NET Framework.</IfFailedComments>
<IfPassedComments>All Exchange Server 2013/2016 servers are running supported versions of .NET Framework.</IfPassedComments>
<IfWarningComments>One or more Exchange Server 2013/2016 servers are not running a supported combination of Exchange and .NET Framework.</IfWarningComments>
<IfFailedComments>One or more Exchange Server 2013/2016 servers are not running a supported combination of Exchange and .NET Framework.</IfFailedComments>
</Test>

<Test>
@@ -63,7 +63,7 @@
<Description>Check that SSL 3.0 protocol support is disabled</Description>
<IfInfoComments></IfInfoComments>
<IfPassedComments>All Exchange servers have SSL 3.0 disabled.</IfPassedComments>
<IfWarningComments></IfWarningComments>
<IfWarningComments>One or more Exchange servers could not be checked for SSL 3.0 status.</IfWarningComments>
<IfFailedComments>One or more Exchange servers do not have SSL 3.0 disabled.</IfFailedComments>
</Test>

@@ -74,9 +74,10 @@
<Description>Check that TTLs on DNS entries for CAS namespaces are not excessive</Description>
<IfInfoComments></IfInfoComments>
<IfPassedComments>All CAS namespace DNS records have acceptable TTLs.</IfPassedComments>
<IfWarningComments></IfWarningComments>
<IfWarningComments>One or more CAS namespace DNS records have high TTLs.</IfWarningComments>
<IfFailedComments>One or more CAS namespace DNS records have excessively high TTLs.</IfFailedComments>
</Test>

<Test>
<Id>POP001</Id>
<Category>POP</Category>
@@ -166,7 +167,7 @@
</Test>

<Test>
<Id>Ad002</Id>
<Id>AD002</Id>
<Category>Active Directory</Category>
<Name>AD Forest Level</Name>
<Description>Check that the forest is at the required level.</Description>
@@ -1,26 +1,26 @@
#Exchange Analyzer
# Exchange Analyzer

[Exchange Analyzer](https://exchangeanalyzer.com) is a PowerShell tool that scans an Exchange Server 2013 or 2016 organization and reports on compliance with best practices.

![](https://exchangeanalyzer.com/wp-content/uploads/2016/03/exchange-analyzer-mockup.png)

Exchange Analyzer is a community project, and is currently a beta release seeking feedback and results from real world environments. A [list of implemented tests](https://github.com/cunninghamp/ExchangeAnalyzer/wiki/Exchange-Analyzer-Tests) is available on the [Exchange Analyzer Wiki](https://github.com/cunninghamp/ExchangeAnalyzer/wiki). A list of [proposed tests](https://github.com/cunninghamp/ExchangeAnalyzer/wiki/Proposed-Tests) that are yet to be developed is also available.
Exchange Analyzer is a community project, and is currently a beta release seeking feedback and results from real world environments. A [list of implemented tests](https://github.com/ExchangeAnalyzer/ExchangeAnalyzer/wiki/Exchange-Analyzer-Tests) is available on the [Exchange Analyzer Wiki](https://github.com/ExchangeAnalyzer/ExchangeAnalyzer/wiki). A list of [proposed tests](https://github.com/ExchangeAnalyzer/ExchangeAnalyzer/wiki/Proposed-Tests) that are yet to be developed is also available.

###Learn More
### Learn More

- [About Exchange Analyzer](https://exchangeanalyzer.com/about/)
- [Using Exchange Analyzer](https://github.com/cunninghamp/ExchangeAnalyzer/wiki/Using-Exchange-Analyzer)
- [Wiki Home Page](https://github.com/cunninghamp/ExchangeAnalyzer/wiki)
- [Using Exchange Analyzer](https://github.com/ExchangeAnalyzer/ExchangeAnalyzer/wiki/Using-Exchange-Analyzer)
- [Wiki Home Page](https://github.com/ExchangeAnalyzer/ExchangeAnalyzer/wiki)

##Credits
## Credits

- [Meet the Team](https://exchangeanalyzer.com/team)
- [Additional contributors](https://github.com/cunninghamp/ExchangeAnalyzer/wiki/Contributors)
- [Additional contributors](https://github.com/ExchangeAnalyzer/ExchangeAnalyzer/wiki/Contributors)

##License
## License

Exchange Analyzer is released under the MIT license (MIT). Full text of the license is available [here](https://github.com/cunninghamp/ExchangeAnalyzer/blob/master/LICENSE).

##Mailing List
## Mailing List

To subscribe to receive news and updates about Exchange Analyzer by email [click here](http://tinyletter.com/ExchangeAnalyzer).
@@ -33,7 +33,7 @@ Runs the Exchange Analyzer outputting results to C:\ExchangeReports\ContosoExcha
Runs the Exchange Analyzer with -Verbose output.
.LINK
http://exchangeanalyzer.com
https://exchangeanalyzer.com
.NOTES
@@ -42,8 +42,8 @@ http://exchangeanalyzer.com
----- Core Team -----
- Paul Cunningham
* Website: http://exchangeserverpro.com
* Twitter: http://twitter.com/exchservpro
* Website: https://paulcunningham.me
* Twitter: https://twitter.com/paulcunningham
- Michael B Smith
* Website: http://theessentialexchange.com/
@@ -58,22 +58,19 @@ http://exchangeanalyzer.com
----- Additional Contributions -----
https://github.com/cunninghamp/ExchangeAnalyzer/wiki/Contributors
https://github.com/ExchangeAnalyzer/ExchangeAnalyzer/wiki/Contributors
*** Change Log ***
v0.2.0-Beta.4, 31/3/2016 - Fourth public beta release
v0.1.2-Beta.3, 18/02/2016 - Third public beta release
v0.1.1-Beta.2, 28/01/2016 - Second public beta release
v0.1.0-Beta.1, 14/01/2016 - Public beta release
Refer to releases:
https://github.com/ExchangeAnalyzer/ExchangeAnalyzer/releases
*** License ***
The MIT License (MIT)
Copyright (c) 2015 Paul Cunningham, exchangeanalyzer.com
Copyright (c) 2017 Paul Cunningham, exchangeanalyzer.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -208,11 +205,11 @@ try

Write-Progress -Activity $ProgressActivity -Status "Get-ExchangeServer" -PercentComplete 1
$ExchangeServersAll = @(Get-ExchangeServer -ErrorAction STOP)
$ExchangeServers = @($ExchangeServersAll | Where {$_.AdminDisplayVersion -like "Version 15.*"})
$ExchangeServers = @($ExchangeServersAll | Where-Object {$_.AdminDisplayVersion -like "Version 15.*"})
Write-Verbose "$($ExchangeServers.Count) Exchange servers found."

#Check for supported servers before continuing
if (($ExchangeServers | Where {$_.AdminDisplayVersion -like "Version 15.*"}).Count -eq 0)
if (($ExchangeServers | Where-Object {$_.AdminDisplayVersion -like "Version 15.*"}).Count -eq 0)
{
Write-Warning "No Exchange 2013 or later servers were found. Exchange Analyzer is exiting."
EXIT
@@ -255,7 +252,7 @@ catch
$msgString = "Determining Client Access servers"
Write-Progress -Activity $ProgressActivity -Status $msgString -PercentComplete 4
Write-Verbose $msgString
$ClientAccessServers = @($ExchangeServers | Where {$_.IsClientAccessServer -and $_.AdminDisplayVersion -like "Version 15.*"})
$ClientAccessServers = @($ExchangeServers | Where-Object {$_.IsClientAccessServer -and $_.AdminDisplayVersion -like "Version 15.*"})
Write-Verbose "$($ClientAccessServers.Count) Client Access servers found."

$msgString = "Collecting Exchange URLs from Client Access servers"
@@ -269,14 +266,14 @@ $msgString = "Collecting POP settings from Client Access and Mailbox servers"
Write-Progress -Activity $ProgressActivity -Status $msgString -PercentComplete 4
Write-Verbose $msgString
#This needs to be processed as a foreach to work in PS remoting
$AllPopSettings = @($ExchangeServers | foreach{Get-PopSettings -Server $_.Identity})
$AllPopSettings = @($ExchangeServers | ForEach-Object {Get-PopSettings -Server $_.Identity})

#Get all IMAP settings for CAS/MBX servers
$msgString = "Collecting IMAP settings from Client Access and Mailbox servers"
Write-Progress -Activity $ProgressActivity -Status $msgString -PercentComplete 4
Write-Verbose $msgString
#This needs to be processed as a foreach to work in PS remoting
$AllImapSettings = @($ExchangeServers | foreach{Get-ImapSettings -Server $_.Identity})
$AllImapSettings = @($ExchangeServers | ForEach-Object {Get-ImapSettings -Server $_.Identity})


#endregion -Basic Data Collection
@@ -289,7 +286,7 @@ $NumberOfTests = ($ExchangeAnalyzerTests.Test).Count
$TestCount = 0
foreach ($Test in $ExchangeAnalyzerTests.ChildNodes.Id)
{
$TestDescription = ($exchangeanalyzertests.Childnodes | Where {$_.Id -eq $Test}).Description
$TestDescription = ($exchangeanalyzertests.Childnodes | Where-Object {$_.Id -eq $Test}).Description
$TestCount += 1
$pct = $TestCount/$NumberOfTests * 100
Write-Progress -Activity $ProgressActivity -Status "Test $($TestCount) of $($NumberOfTests): $TestDescription" -PercentComplete $pct
@@ -349,25 +346,25 @@ $IntroHtml="<h1>Exchange Analyzer Report</h1>
<p><strong>Organization:</strong> $($ExchangeOrganization.Name)</p>
<p>The following guidelines apply to this report:
<ul>
<li>This tests included in this report are documented on the <a href=""https://github.com/cunninghamp/ExchangeAnalyzer/wiki/Exchange-Analyzer-Tests"">Exchange Analyzer Wiki</a>.</li>
<li>This tests included in this report are documented on the <a href=""https://github.com/ExchangeAnalyzer/ExchangeAnalyzer/wiki/Exchange-Analyzer-Tests"">Exchange Analyzer Wiki</a>.</li>
<li>Click the ""More Info"" link for each test to learn more about that test, what a pass or fail means, and recommendations for how to respond.</li>
<li>A test can fail if it can't complete successfully, or if a condition was encountered that requires manual assessment.</li>
<li>For some organizations a failed test may be due to a deliberate design or operational decision.</li>
<li>Please review the <a href=""https://github.com/cunninghamp/ExchangeAnalyzer/wiki/Frequently-Asked-Questions"">Frequently Asked Questions</a> if you have any further questions.</li>
<li>Please review the <a href=""https://github.com/ExchangeAnalyzer/ExchangeAnalyzer/wiki/Frequently-Asked-Questions"">Frequently Asked Questions</a> if you have any further questions.</li>
</ul>
</p>"

#Count of test results
$PassedItems = @($report | Where {$_.TestOutcome -eq "Passed"})
$TotalPassed = $PassItems.Count
$PassedItems = @($report | Where-Object {$_.TestOutcome -eq "Passed"})
$TotalPassed = $PassedItems.Count

$WarningItems = @($report | Where {$_.TestOutcome -eq "Warning"})
$WarningItems = @($report | Where-Object {$_.TestOutcome -eq "Warning"})
$TotalWarning = $WarningItems.Count

$FailedItems = @($report | Where {$_.TestOutcome -eq "Failed"})
$FailedItems = @($report | Where-Object {$_.TestOutcome -eq "Failed"})
$TotalFailed = $FailedItems.Count

$InfoItems = @($report | Where {$_.TestOutcome -eq "Info"})
$InfoItems = @($report | Where-Object {$_.TestOutcome -eq "Info"})
$TotalInfo = $InfoItems.Count

#HTML summary table
@@ -429,6 +426,8 @@ $ExchangeServersSummaryHtml += "<p>Summary of Exchange Servers:</p>
<table>
<tr>
<th>Name</th>
<th>Version</th>
<th>.NET Framework</th>
<th>Site</th>
<th>Domain</th>
<th>Roles</th>
@@ -439,10 +438,12 @@ $ExchangeServersSummaryHtml += "<p>Summary of Exchange Servers:</p>
foreach ($Server in $ExchangeServersAll)
{
#See Issue #62 in Github for why this ToString() is required for compatiblity with 2013/2016.
$ServerADSite = ($ExchangeServersAll | Where {$_.Name -ieq $($server.Name)}).Site.ToString()
$ServerADSite = ($ExchangeServersAll | Where-Object {$_.Name -ieq $($server.Name)}).Site.ToString()

$ExchangeServersSummaryHtml += "<tr>
<td>$($Server.Name)</td>
<td>$(Get-ExAServerProperty -Server $Server -Property "BuildDescription")</td>
<td>$(Get-ExAServerProperty -Server $Server -Property ".NET Framework")</td>
<td>$($ServerADSite.Split("/")[-1])</td>
<td>$($Server.Domain)</td>
<td>$($Server.ServerRole)</td>
@@ -461,7 +462,7 @@ $CASURLSummaryHtml += "<p>Summary of Client Access URLs/Namespaces:</p>"
foreach ($server in $CASURLs)
{
#See Issue #62 in Github for why this ToString() is required for compatiblity with 2013/2016.
$ServerADSite = ($ExchangeServers | Where {$_.Name -ieq $($server.Name)}).Site.ToString()
$ServerADSite = ($ExchangeServers | Where-Object {$_.Name -ieq $($server.Name)}).Site.ToString()

$CASURLSummaryHtml += "<table>
<tr>
@@ -473,7 +474,7 @@ foreach ($server in $CASURLs)
<th>External Url</th>
</tr>
<tr>
<td>Outlook Anywhere</td>
<td>Outlook AnyWhere-Object</td>
<td>$($server.OAInternal)</td>
<td>$($server.OAExternal)</td>
</tr>
@@ -543,7 +544,7 @@ $DatabaseSummaryHtml += "</table>


#Build a list of report categories
$reportcategories = $report | Group-Object -Property TestCategory | Select Name
$reportcategories = $report | Group-Object -Property TestCategory | Select-Object Name

#Create report HTML for each category
foreach ($reportcategory in $reportcategories)
@@ -588,7 +589,7 @@ foreach ($reportcategory in $reportcategories)
$categoryHtmlTable += $categoryHtmlHeader

#Generate each HTML table row
foreach ($reportline in ($report | Where {$_.TestCategory -eq $reportcategory.Name}))
foreach ($reportline in ($report | Where-Object {$_.TestCategory -eq $reportcategory.Name}))
{
$HtmlTableRow = "<tr>"
$htmltablerow += "<td>$($reportline.TestName)</td>"
@@ -59,7 +59,7 @@ Function Run-DB001()
}
else
{
$LastInc = "{0:00}" -f ($now.ToUniversalTime() - $db.LastIncrementalBackup.ToUniversalTime()).TotalHours
$LastInc = "{0:D0}" -f ($now.ToUniversalTime() - $db.LastIncrementalBackup.ToUniversalTime()).TotalHours
}

if (-not $db.LastDifferentialBackup)
@@ -68,7 +68,7 @@ Function Run-DB001()
}
else
{
$LastDiff = "{0:00}" -f ($now.ToUniversalTime() - $db.LastDifferentialBackup.ToUniversalTime()).TotalHours
$LastDiff = "{0:D0}" -f ($now.ToUniversalTime() - $db.LastDifferentialBackup.ToUniversalTime()).TotalHours
}

if (-not $db.LastFullBackup)
@@ -77,7 +77,7 @@ Function Run-DB001()
}
else
{
$LastFull = "{0:00}" -f ($now.ToUniversalTime() - $db.LastFullBackup.ToUniversalTime()).TotalHours
$LastFull = "{0:D0}" -f ($now.ToUniversalTime() - $db.LastFullBackup.ToUniversalTime()).TotalHours
}

$LastBackups = @{
@@ -109,7 +109,8 @@ Function Run-EXSRV002()
$buildindex = $Exchange2013Builds."Build Number".IndexOf("$buildnumber")
Write-Verbose "Build index is: $($buildindex)"

Write-Verbose "Exchange version is: $($Exchange2013Builds[$buildindex]."Product Name")"
$BuildDescription = $($Exchange2013Builds[$buildindex]."Description")
Write-Verbose "Exchange version is: $($BuildDescription)"
$buildage = New-TimeSpan -Start ($Exchange2013Builds[$buildindex]."Release Date") -End $now

#Fixes issue when $buildindex is -1 due to being last item in the array
@@ -136,7 +137,8 @@ Function Run-EXSRV002()
$buildindex = $Exchange2016Builds."Build Number".IndexOf("$buildnumber")
Write-Verbose "Build index is: $($buildindex)"

Write-Verbose "Exchange version is: $($Exchange2016Builds[$buildindex]."Product Name")"
$BuildDescription = $($Exchange2016Builds[$buildindex]."Description")
Write-Verbose "Exchange version is: $($BuildDescription)"
$buildage = New-TimeSpan -Start ($Exchange2016Builds[$buildindex]."Release Date") -End $now

#Fixes issue when $buildindex is -1 due to being last item in the array
@@ -152,6 +154,8 @@ Function Run-EXSRV002()

}



if ($buildage -eq "Unknown")
{
Write-Verbose "Build number $buildnumber not found in $BuildNumbersXmlFile"
@@ -185,6 +189,10 @@ Function Run-EXSRV002()
#Skip servers earlier than v15.0
Write-Verbose "$server is earlier than Exchange 2013 and will not be checked."
}

#Store build information in server property bag
Set-ExAServerProperty -Server $Server -Property 'BuildNumber' -Value $BuildNumber
Set-ExAServerProperty -Server $Server -Property 'BuildDescription' -Value $BuildDescription
}
}

Oops, something went wrong.

0 comments on commit bc293d3

Please sign in to comment.
You can’t perform that action at this time.