Skip to main content

Exchange Server - Subscription Edition - Known Issue after update

Versions Affected

V15.28 onwards

Exchange Server - Subscription Edition

Exchange Server Subscription Edition was released on the 1st of July, 2025 as a CU update for Exchange Server 2019. At the time of writing (18th September) Atria has full support of Exchange Server SE Edition.

We have seen some issues on upgrade where the Web Service for Atria to connect to Exchange Server is not functional. We are still investigating the root cause, but this can be fixed with recreating the Atria component.

Solution

Below is the PowerShell command to run, first copy the PowerShell Script to the affected Exchange Server, and save it as 'RecreateApplicationAppPool.ps1'

Run this with the command

.\RecreateApplicationAppPool.ps1 -AtriaApplicationName Exchange
Param(
[Parameter(Mandatory=$True)]
[String]$AtriaApplicationName
)

function ValidateApplication{

Param(
[Parameter(Mandatory=$True)]
[String]$Application
)

Write-Host "Getting $($Application) web application";
Start-Sleep -Seconds 2;

$exist = Get-ChildItem -Path 'IIS:\Sites\Atria Web Services' | Where-Object {$_.Name -eq $Application};

if(!$exist){
Write-Host "Application $($application) not found in IIS" -ForegroundColor Red;
exit;
}
}

function ChangeApplicationAppPool{

Param(
[Parameter(Mandatory=$True)]
[String]$Application
)

Write-Host "Changing application to use Default AppPool";
Start-Sleep -Seconds 2;

Try{

$apppath = "IIS:\Sites\Atria Web Services\{0}" -f $Application;
Set-ItemProperty -Path $apppath applicationPool "Default";

}Catch{

Write-Host "Failed to change Application Pool" -ForegroundColor Red;
Write-Host $_.exception.message -ForegroundColor Red;
exit;

}
}

function RecreateApplicationPool{

Param(
[Parameter(Mandatory=$True)]
[String]$AppPoolName,
[Parameter(Mandatory=$True)]
$AppPoolIdentity
)

Write-Host "Recreating Application pool";
Start-Sleep -Seconds 2;

Try{

$exist = Get-ChildItem -Path IIS:\AppPools | Where-Object {$_.Name -eq $AppPoolName};

if($exist){
Remove-WebAppPool -Name $AppPoolName -Confirm:$false;
}

New-WebAppPool -Name $AppPoolName;

$AppPool = Get-ChildItem -Path IIS:\AppPools | Where-Object {$_.Name -eq $AppPoolName};

if($AppPool){

Write-Host "Configuring new Application pool";
Start-Sleep -Seconds 2;

$AppPool.processModel.IdentityType = 'SpecificUser';
$AppPool.processModel.UserName = $AppPoolIdentity.UserName;
$AppPool.processModel.Password = $AppPoolIdentity.Password;
$AppPool.failure.rapidFailProtection = "False";
$AppPool | Set-Item;
}

}Catch{

Write-Host "Failed to recreate Application Pool" -ForegroundColor Red;
Write-Host $_.exception.message -ForegroundColor Red;
exit;
}
}

Import-Module WebAdministration;

Write-Host "Script starting";

$apppoolname = "Atria {0}WS AppPool" -f $AtriaApplicationName;
$appsecretkey = "Credential_{0}_{1}WS" -f $env:COMPUTERNAME, $AtriaApplicationName;

Write-Host "Getting AppPool stored credential";
Start-Sleep -Seconds 2;

$apppoolcredential = (Get-AtriaSecret -SecretKey $appsecretkey -UseEnvironment) | ConvertFrom-Json;

if(!$apppoolcredential){
Write-Host "Failed to get AppPool stored credential" -ForegroundColor Red;
exit;
}

ValidateApplication -Application $AtriaApplicationName;
ChangeApplicationAppPool -Application $AtriaApplicationName;
RecreateApplicationPool -AppPoolName $apppoolname -AppPoolIdentity $apppoolcredential;


Write-Host "Setting Application pool to use new AppPool";
Start-Sleep -Seconds 2;

$apppath = "IIS:\Sites\Atria Web Services\{0}" -f $AtriaApplicationName;
Set-ItemProperty -Path $apppath applicationPool $apppoolname;

Write-Host "Script done";