Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 6-13-24 #2101

Merged
merged 16 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion Databases/VSSTester/Logging/Get-VSSWriter.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,19 @@ function Get-VSSWriter {
throw "Unable to list vss writers"
}

for ($lineNumber = 3; $lineNumber -lt $writersText.Count; $lineNumber += 6) {
$startIndex = 3

if (-not ($writersText[$startIndex] -like "Writer name*")) {
Write-Host "Finding the first writer..."
for ($lineNumber = $startIndex; $lineNumber -lt $writersText.Count; $lineNumber++) {
if ($writersText[$lineNumber] -like "Writer name*") {
$startIndex = $lineNumber
break
}
}
}

for ($lineNumber = $startIndex; $lineNumber -lt $writersText.Count; $lineNumber += 6) {
[PSCustomObject]@{
Name = $writersText[$lineNumber].Substring($writersText[$lineNumber].IndexOf("'") + 1).TrimEnd("'")
Id = $writersText[$lineNumber + 1].Substring($writersText[$lineNumber + 1].IndexOf("{") + 1).TrimEnd("}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,68 @@ function Invoke-AnalyzerExchangeInformation {
Add-AnalyzedResultInformation @params
}

if ($exchangeInformation.GetExchangeServer.IsEdgeServer -eq $false) {
Write-Verbose "Determining Server Group Membership"

$params = $baseParams + @{
Name = "Exchange Server Membership"
Details = "Passed"
DisplayWriteType = "Grey"
}

if ($null -ne $exchangeInformation.ComputerMembership -and
$null -ne $HealthServerObject.OrganizationInformation.WellKnownSecurityGroups) {
$localGroupList = $HealthServerObject.OrganizationInformation.WellKnownSecurityGroups |
Where-Object { $_.WellKnownName -eq "Exchange Trusted Subsystem" }
# By Default, I also have Managed Availability Servers and Exchange Install Domain Servers.
# But not sure what issue they would cause if we don't have the server as a member, leaving out for now
$adGroupList = $HealthServerObject.OrganizationInformation.WellKnownSecurityGroups |
Where-Object { $_.WellKnownName -in @("Exchange Trusted Subsystem", "Exchange Servers") }
$displayMissingGroups = New-Object System.Collections.Generic.List[string]

foreach ($localGroup in $localGroupList) {
if (($null -eq ($exchangeInformation.ComputerMembership.LocalGroupMember.SID | Where-Object { $_.ToString() -eq $localGroup.SID } ))) {
$displayMissingGroups.Add("$($localGroup.WellKnownName) - Local System Membership")
}
}

foreach ($adGroup in $adGroupList) {
if (($null -eq ($exchangeInformation.ComputerMembership.ADGroupMembership.SID | Where-Object { $_.ToString() -eq $adGroup.SID }))) {
$displayMissingGroups.Add("$($adGroup.WellKnownName) - AD Group Membership")
}
}

if ($displayMissingGroups.Count -ge 1) {
$params.DisplayWriteType = "Red"
$params.Details = "Failed"
Add-AnalyzedResultInformation @params

foreach ($group in $displayMissingGroups) {
$params = $baseParams + @{
Details = $group
TestingName = $group
DisplayWriteType = "Red"
DisplayCustomTabNumber = 2
}
Add-AnalyzedResultInformation @params
}

$params = $baseParams + @{
Details = "More Information: https://aka.ms/HC-ServerMembership"
DisplayWriteType = "Yellow"
DisplayCustomTabNumber = 2
}
Add-AnalyzedResultInformation @params
} else {
Add-AnalyzedResultInformation @params
}
} else {
$params.DisplayWriteType = "Yellow"
$params.Details = "Unknown - Wasn't able to get the Computer Membership information"
Add-AnalyzedResultInformation @params
}
}

if ($exchangeInformation.BuildInformation.MajorVersion -eq "Exchange2013" -and
$exchangeInformation.GetExchangeServer.IsClientAccessServer -eq $true) {

Expand Down Expand Up @@ -466,6 +528,34 @@ function Invoke-AnalyzerExchangeInformation {
}
}

if ($null -ne $exchangeInformation.EdgeTransportResourceThrottling) {
try {
# SystemMemory does not block mail flow.
$resourceThrottling = ([xml]$exchangeInformation.EdgeTransportResourceThrottling).Diagnostics.Components.ResourceThrottling.ResourceTracker.ResourceMeter |
Where-Object { $_.Resource -ne "SystemMemory" -and $_.CurrentResourceUse -ne "Low" }
} catch {
Invoke-CatchActions
}

if ($null -ne $resourceThrottling) {
$resourceThrottlingList = @($resourceThrottling.Resource |
ForEach-Object {
$index = $_.IndexOf("[")
if ($index -eq -1) {
$_
} else {
$_.Substring(0, $index)
}
})
$params = $baseParams + @{
Name = "Transport Back Pressure"
Details = "--ERROR-- The following resources are causing back pressure: $([string]::Join(", ", $resourceThrottlingList))"
DisplayWriteType = "Red"
}
Add-AnalyzedResultInformation @params
}
}

Write-Verbose "Working on Exchange Server Maintenance"
$serverMaintenance = $exchangeInformation.ServerMaintenance
$getMailboxServer = $exchangeInformation.GetMailboxServer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
. $PSScriptRoot\..\..\..\..\Shared\Get-ExtendedProtectionConfiguration.ps1
. $PSScriptRoot\..\..\..\..\Shared\ErrorMonitorFunctions.ps1
. $PSScriptRoot\..\..\..\..\Shared\Get-ExchangeBuildVersionInformation.ps1
. $PSScriptRoot\..\..\..\..\Shared\Get-ExchangeDiagnosticInformation.ps1
. $PSScriptRoot\..\..\..\..\Shared\Get-ExchangeSettingOverride.ps1
. $PSScriptRoot\..\..\..\..\Shared\Get-ExSetupFileVersionInfo.ps1
. $PSScriptRoot\..\..\..\..\Shared\Get-FileContentInformation.ps1
Expand Down Expand Up @@ -186,6 +187,29 @@ function Get-ExchangeInformation {
VersionInformation = $versionInformation
}
$aes256CbcDetails = Get-ExchangeAES256CBCDetails @aes256CbcParams

Write-Verbose "Getting Exchange Diagnostic Information"
$params = @{
Server = $Server
Process = "EdgeTransport"
Component = "ResourceThrottling"
}
$edgeTransportResourceThrottling = Get-ExchangeDiagnosticInformation @params

if ($getExchangeServer.IsEdgeServer -eq $false) {
$params = @{
ComputerName = $Server
ScriptBlockDescription = "Getting Exchange Server Members"
CatchActionFunction = ${Function:Invoke-CatchActions}
ScriptBlock = {
[PSCustomObject]@{
LocalGroupMember = (Get-LocalGroupMember -SID "S-1-5-32-544")
ADGroupMembership = (Get-ADPrincipalGroupMembership (Get-ADComputer $env:COMPUTERNAME).DistinguishedName)
}
}
}
$computerMembership = Invoke-ScriptBlockHandler @params
}
} end {

Write-Verbose "Exiting: Get-ExchangeInformation"
Expand All @@ -202,13 +226,15 @@ function Get-ExchangeInformation {
ServerMaintenance = $serverMaintenance
ExchangeCertificates = [array]$exchangeCertificates
ExchangeEmergencyMitigationServiceResult = $eemsEndpointResults
EdgeTransportResourceThrottling = $edgeTransportResourceThrottling # If we want to checkout other diagnosticInfo, we should create a new object here.
ApplicationConfigFileStatus = $applicationConfigFileStatus
DependentServices = $dependentServices
IISSettings = $iisSettings
SettingOverrides = $settingOverrides
FIPFSUpdateIssue = $FIPFSUpdateIssue
AES256CBCInformation = $aes256CbcDetails
FileContentInformation = $fileContentInformation
ComputerMembership = $computerMembership
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">
<Obj RefId="0">
<TN RefId="0">
<T>Microsoft.ActiveDirectory.Management.ADGroup</T>
<T>Microsoft.ActiveDirectory.Management.ADPrincipal</T>
<T>Microsoft.ActiveDirectory.Management.ADObject</T>
<T>Microsoft.ActiveDirectory.Management.ADEntity</T>
<T>Microsoft.ActiveDirectory.Management.ADPropertyCollection</T>
<T>System.Object</T>
</TN>
<ToString>CN=Domain Computers,CN=Users,DC=Solo,DC=net</ToString>
<Props>
<S N="distinguishedName">CN=Domain Computers,CN=Users,DC=Solo,DC=net</S>
<Obj N="GroupCategory" RefId="1">
<TN RefId="1">
<T>Microsoft.ActiveDirectory.Management.ADGroupCategory</T>
<T>System.Enum</T>
<T>System.ValueType</T>
<T>System.Object</T>
</TN>
<ToString>Security</ToString>
<I32>1</I32>
</Obj>
<Obj N="GroupScope" RefId="2">
<TN RefId="2">
<T>Microsoft.ActiveDirectory.Management.ADGroupScope</T>
<T>System.Enum</T>
<T>System.ValueType</T>
<T>System.Object</T>
</TN>
<ToString>Global</ToString>
<I32>1</I32>
</Obj>
<S N="name">Domain Computers</S>
<S N="objectClass">group</S>
<G N="objectGUID">a265b2c2-546e-407b-ad71-db09915a10f7</G>
<S N="SamAccountName">Domain Computers</S>
<Obj N="SID" RefId="3">
<TN RefId="3">
<T>System.Security.Principal.SecurityIdentifier</T>
<T>System.Security.Principal.IdentityReference</T>
<T>System.Object</T>
</TN>
<ToString>S-1-5-21-1824353829-339629374-102541804-515</ToString>
<Props>
<I32 N="BinaryLength">28</I32>
<S N="AccountDomainSid">S-1-5-21-1824353829-339629374-102541804</S>
<S N="Value">S-1-5-21-1824353829-339629374-102541804-515</S>
</Props>
</Obj>
</Props>
</Obj>
<Obj RefId="4">
<TNRef RefId="0" />
<ToString>CN=Exchange Servers,OU=Microsoft Exchange Security Groups,DC=Solo,DC=net</ToString>
<Props>
<S N="distinguishedName">CN=Exchange Servers,OU=Microsoft Exchange Security Groups,DC=Solo,DC=net</S>
<Obj N="GroupCategory" RefId="5">
<TNRef RefId="1" />
<ToString>Security</ToString>
<I32>1</I32>
</Obj>
<Obj N="GroupScope" RefId="6">
<TNRef RefId="2" />
<ToString>Universal</ToString>
<I32>2</I32>
</Obj>
<S N="name">Exchange Servers</S>
<S N="objectClass">group</S>
<G N="objectGUID">0483eec8-edd9-4e86-9991-d4e53a57668b</G>
<S N="SamAccountName">Exchange Servers</S>
<Obj N="SID" RefId="7">
<TNRef RefId="3" />
<ToString>S-1-5-21-1824353829-339629374-102541804-1118</ToString>
<Props>
<I32 N="BinaryLength">28</I32>
<S N="AccountDomainSid">S-1-5-21-1824353829-339629374-102541804</S>
<S N="Value">S-1-5-21-1824353829-339629374-102541804-1118</S>
</Props>
</Obj>
</Props>
</Obj>
<Obj RefId="8">
<TNRef RefId="0" />
<ToString>CN=Exchange Trusted Subsystem,OU=Microsoft Exchange Security Groups,DC=Solo,DC=net</ToString>
<Props>
<S N="distinguishedName">CN=Exchange Trusted Subsystem,OU=Microsoft Exchange Security Groups,DC=Solo,DC=net</S>
<Obj N="GroupCategory" RefId="9">
<TNRef RefId="1" />
<ToString>Security</ToString>
<I32>1</I32>
</Obj>
<Obj N="GroupScope" RefId="10">
<TNRef RefId="2" />
<ToString>Universal</ToString>
<I32>2</I32>
</Obj>
<S N="name">Exchange Trusted Subsystem</S>
<S N="objectClass">group</S>
<G N="objectGUID">03db4cb0-2e2f-424d-9b67-3aced8c2e7d1</G>
<S N="SamAccountName">Exchange Trusted Subsystem</S>
<Obj N="SID" RefId="11">
<TNRef RefId="3" />
<ToString>S-1-5-21-1824353829-339629374-102541804-1119</ToString>
<Props>
<I32 N="BinaryLength">28</I32>
<S N="AccountDomainSid">S-1-5-21-1824353829-339629374-102541804</S>
<S N="Value">S-1-5-21-1824353829-339629374-102541804-1119</S>
</Props>
</Obj>
</Props>
</Obj>
<Obj RefId="12">
<TNRef RefId="0" />
<ToString>CN=Managed Availability Servers,OU=Microsoft Exchange Security Groups,DC=Solo,DC=net</ToString>
<Props>
<S N="distinguishedName">CN=Managed Availability Servers,OU=Microsoft Exchange Security Groups,DC=Solo,DC=net</S>
<Obj N="GroupCategory" RefId="13">
<TNRef RefId="1" />
<ToString>Security</ToString>
<I32>1</I32>
</Obj>
<Obj N="GroupScope" RefId="14">
<TNRef RefId="2" />
<ToString>Universal</ToString>
<I32>2</I32>
</Obj>
<S N="name">Managed Availability Servers</S>
<S N="objectClass">group</S>
<G N="objectGUID">f7cb65c0-1f58-4504-a698-68fa0ae76505</G>
<S N="SamAccountName">Managed Availability Servers</S>
<Obj N="SID" RefId="15">
<TNRef RefId="3" />
<ToString>S-1-5-21-1824353829-339629374-102541804-1120</ToString>
<Props>
<I32 N="BinaryLength">28</I32>
<S N="AccountDomainSid">S-1-5-21-1824353829-339629374-102541804</S>
<S N="Value">S-1-5-21-1824353829-339629374-102541804-1120</S>
</Props>
</Obj>
</Props>
</Obj>
<Obj RefId="16">
<TNRef RefId="0" />
<ToString>CN=Exchange Install Domain Servers,CN=Microsoft Exchange System Objects,DC=Solo,DC=net</ToString>
<Props>
<S N="distinguishedName">CN=Exchange Install Domain Servers,CN=Microsoft Exchange System Objects,DC=Solo,DC=net</S>
<Obj N="GroupCategory" RefId="17">
<TNRef RefId="1" />
<ToString>Security</ToString>
<I32>1</I32>
</Obj>
<Obj N="GroupScope" RefId="18">
<TNRef RefId="2" />
<ToString>Global</ToString>
<I32>1</I32>
</Obj>
<S N="name">Exchange Install Domain Servers</S>
<S N="objectClass">group</S>
<G N="objectGUID">fc1e7024-4d8b-4702-b171-a26997425da7</G>
<S N="SamAccountName">$A31000-HSHK6J896T3O</S>
<Obj N="SID" RefId="19">
<TNRef RefId="3" />
<ToString>S-1-5-21-1824353829-339629374-102541804-1130</ToString>
<Props>
<I32 N="BinaryLength">28</I32>
<S N="AccountDomainSid">S-1-5-21-1824353829-339629374-102541804</S>
<S N="Value">S-1-5-21-1824353829-339629374-102541804-1130</S>
</Props>
</Obj>
</Props>
</Obj>
</Objs>
Loading
Loading