I am currently deploying a package via ConfigMgr to update a critical piece of software. This is currently deploying to 1000+ devices and in the main is working fine.
However I have encountered a small number of machines erroring with the following
Below is the output from the AppEnforce.Log
+++ Starting Install enforcement for App DT "Install - NHS-Digital_NHS_Digital-Identity-Agent_2.4.10.0_3M" ApplicationDeliveryType - ScopeId_E1B117DD-B27F-4FA2-936C-AC2D7CCB7C70/DeploymentType_a5aace45-74e3-4113-90ab-f9b4eec7fd4b, Revision - 19, ContentPath - C:\WINDOWS\ccmcache\p, Execution Context - System AppEnforce 09/10/2025 08:47:19 14512 (0x38B0)
Performing detection of app deployment type Install - NHS-Digital_NHS_Digital-Identity-Agent_2.4.10.0_3M(ScopeId_E1B117DD-B27F-4FA2-936C-AC2D7CCB7C70/DeploymentType_a5aace45-74e3-4113-90ab-f9b4eec7fd4b, revision 19) for system. AppEnforce 09/10/2025 08:47:19 14512 (0x38B0)
+++ Application not discovered. [AppDT Id: ScopeId_E1B117DD-B27F-4FA2-936C-AC2D7CCB7C70/DeploymentType_a5aace45-74e3-4113-90ab-f9b4eec7fd4b, Revision: 19] AppEnforce 09/10/2025 08:47:19 14512 (0x38B0)
App enforcement environment:
Context: Machine
Command line: "Invoke-AppDeployToolkit.exe" -DeploymentType Install -DeployMode Interactive
Allow user interaction: Yes
UI mode: 0
User token: null
Session Id: 4294967295
Content path: C:\WINDOWS\ccmcache\p
Working directory: AppEnforce 09/10/2025 08:47:19 14512 (0x38B0)
Prepared working directory: C:\WINDOWS\ccmcache\p AppEnforce 09/10/2025 08:47:19 14512 (0x38B0)
Prepared command line: "C:\WINDOWS\ccmcache\p\Invoke-AppDeployToolkit.exe" -DeploymentType Install -DeployMode Interactive AppEnforce 09/10/2025 08:47:19 14512 (0x38B0)
Executing Command line: "C:\WINDOWS\ccmcache\p\Invoke-AppDeployToolkit.exe" -DeploymentType Install -DeployMode Interactive with user context AppEnforce 09/10/2025 08:47:19 14512 (0x38B0)
Working directory C:\WINDOWS\ccmcache\p AppEnforce 09/10/2025 08:47:19 14512 (0x38B0)
Post install behavior is NoAction AppEnforce 09/10/2025 08:47:20 14512 (0x38B0)
Waiting for process 16740 to finish. Timeout = 90 minutes. AppEnforce 09/10/2025 08:47:20 14512 (0x38B0)
Process 16740 terminated with exitcode: 1073807364 AppEnforce 09/10/2025 08:54:33 14512 (0x38B0)
Looking for exit code 1073807364 in exit codes table... AppEnforce 09/10/2025 08:54:33 14512 (0x38B0)
Unmatched exit code (1073807364) is considered an execution failure. AppEnforce 09/10/2025 08:54:33 14512 (0x38B0)
++++++ App enforcement completed (434 seconds) for App DT "Install - NHS-Digital_NHS_Digital-Identity-Agent_2.4.10.0_3M" [ScopeId_E1B117DD-B27F-4FA2-936C-AC2D7CCB7C70/DeploymentType_a5aace45-74e3-4113-90ab-f9b4eec7fd4b], Revision: 19, User SID: ] ++++++ AppEnforce 09/10/2025 08:54:34 14512 (0x38B0)
Here is the PSADT Log
------------------------------------------------------------------------------- Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [NHS-Digital_NHS_Digital-Identity-Agent_2.4.10.0_3M] install started. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [NHS-Digital_NHS_Digital-Identity-Agent_2.4.10.0_3M] script version is [1.0.0]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [NHS-Digital_NHS_Digital-Identity-Agent_2.4.10.0_3M] script date is [2025-10-02]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [NHS-Digital_NHS_Digital-Identity-Agent_2.4.10.0_3M] script author is [Workspace IT]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [Invoke-AppDeployToolkit.ps1] script version is [4.1.5]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: The following parameters were passed to [Invoke-AppDeployToolkit.ps1]: [-DeploymentType:'Install' -DeployMode:'Interactive']. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [PSAppDeployToolkit] module version is [4.1.5]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [PSAppDeployToolkit] module imported in [5.8124737] seconds. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [PSAppDeployToolkit] module initialized in [6.4217094] seconds. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [PSAppDeployToolkit] module path is ['C:\WINDOWS\ccmcache\p\PSAppDeployToolkit']. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [PSAppDeployToolkit] config path is ['C:\WINDOWS\ccmcache\p\Config']. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [PSAppDeployToolkit] string path is ['C:\WINDOWS\ccmcache\p\Strings']. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: [PSAppDeployToolkit] session mode is [Native]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Computer Name is [*REMOVED*]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Current User is [NT AUTHORITY\SYSTEM]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: OS Version is [Microsoft Windows 10 Enterprise X64 10.0.19045.6332]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: OS Type is [WorkStation]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Hardware Platform is [Physical]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Current Culture is [en-GB], language is [EN] and UI language is [EN]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: PowerShell Host is [ConsoleHost] with version [5.1.19041.6328]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: PowerShell Version is [5.1.19041.6328 X64]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: PowerShell Process Path is [C:\WINDOWS\system32\WindowsPowerShell\v1.0\PowerShell.exe]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: PowerShell CLR (.NET) version is [4.0.30319.42000]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: The following users are logged on to the system: [*REMOVED*]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Session information for all logged on users:
NTAccount : *REMOVED*
SID : S-1-5-21-900989307-1351906760-1008230154-163032
UserName : *REMOVED*
DomainName : *REMOVED*
SessionId : 2
SessionName :
ConnectState : WTSDisconnected
IsCurrentSession : False
IsConsoleSession : False
IsActiveUserSession : False
IsValidUserSession : True
IsUserSession : True
IsRdpSession : False
IsLocalAdmin : False
IsLocalAdminException :
LogonTime : 08/10/2025 17:58:16
IdleTime : 14:40:25.4773407
DisconnectTime : 08/10/2025 18:07:07
ClientName :
ClientProtocolType : Console
ClientDirectory :
ClientBuildNumber :
NTAccount : *REMOVED*
SID : S-1-5-21-900989307-1351906760-1008230154-95324
UserName : *REMOVED*
DomainName : *REMOVED*
SessionId : 3
SessionName : Console
ConnectState : WTSActive
IsCurrentSession : True
IsConsoleSession : True
IsActiveUserSession : True
IsValidUserSession : True
IsUserSession : True
IsRdpSession : False
IsLocalAdmin : False
IsLocalAdminException :
LogonTime : 09/10/2025 08:47:09
IdleTime : 00:00:03.5310000
DisconnectTime :
ClientName :
ClientProtocolType : Console
ClientDirectory :
ClientBuildNumber :
Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Current process is running with user account [NT AUTHORITY\SYSTEM] under logged on user session for [*REMOVED*]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: The following user is the console user [*REMOVED*] (user with control of physical monitor, keyboard, and mouse). Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: The active logged on user who will receive UI elements is [*REMOVED*]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: The current execution context has a primary UI language of [en-US]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: The following locale was used to import UI messages from the strings.psd1 files: [en-GB]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Unable to find COM object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Device has completed the OOBE and toolkit is not running with an active ESP in progress. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Session 0 detected but deployment mode was explicitly set to [Interactive]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: No processes were specified as requiring closure. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Installation is running in [Interactive] mode. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Deployment type is [Install]. Open-ADTSession 09/10/2025 08:47:37 15376 (0x3C10)
[Initialization] :: Module [PSAppDeployToolkit.Extensions] imported successfully. PSAppDeployToolkit.Extensions.psm1 09/10/2025 08:47:37 15376 (0x3C10)
[Pre-Install] :: Checking for running processes: ['NHSHub.UI'] Get-ADTRunningProcesses 09/10/2025 08:47:38 15376 (0x3C10)
[Pre-Install] :: The following processes are running: ['NHSHub.UI']. Get-ADTRunningProcesses 09/10/2025 08:47:38 15376 (0x3C10)
[Pre-Install] :: Instantiating user client/server process. Invoke-ADTClientServerOperation 09/10/2025 08:47:38 15376 (0x3C10)
[Pre-Install] :: Countdown has [01:00:00] seconds remaining. Show-ADTInstallationWelcome 09/10/2025 08:47:39 15376 (0x3C10)
[Pre-Install] :: The running processes have changed. Updating the apps to close: ['NHS Digital Identity Agent']... Show-ADTInstallationWelcome 09/10/2025 08:48:00 15376 (0x3C10)
And here is the PSADT Script used - I've excluded the remainder of the script as it is not relevant.
$adtSession = @{
# App variables.
AppVendor = 'NHS Digital'
AppName = 'NHS Digital Identity Agent'
AppVersion = '2.4.10.0'
AppArch = ''
AppLang = 'EN'
AppRevision = '03'
AppSuccessExitCodes = @(0)
AppRebootExitCodes = @(1641, 3010)
AppProcessesToClose = @("")
AppScriptVersion = '1.0.0'
AppScriptDate = '2025-10-02'
AppScriptAuthor = ''
RequireAdmin = $true
# Install Titles (Only set here to override defaults set by the toolkit).
InstallName = 'NHS-Digital_NHS_Digital-Identity-Agent_2.4.10.0_3M'
InstallTitle = 'NHS-Digital_NHS_Digital-Identity-Agent_2.4.10.0_3M'
# Script variables.
DeployAppScriptFriendlyName = $MyInvocation.MyCommand.Name
DeployAppScriptParameters = $PSBoundParameters
DeployAppScriptVersion = '4.1.5'
}
function Install-ADTDeployment
{
[CmdletBinding()]
param
(
)
##================================================
## MARK: Pre-Install
##================================================
$adtSession.InstallPhase = "Pre-$($adtSession.DeploymentType)"
Show-ADTInstallationWelcome -CloseProcesses @{ Name = 'NHSHub.UI'; Description = 'NHS Digital Identity Agent' } -CloseProcessesCountdown 3600 -HideCloseButton -Title "Critical Application Update"
So according to the PSADT log it should be presenting the user with the Installation Welcome when NHSHUB.UI is found. However it's crashing out and when looking in the Application Event Log I've found this which matches the same time that AppEnforce.log catches the error.
Application: IdentityAgent.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: exception code c0000005, exception address 68EDFF60
Stack:
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.NativeWindow.DefWndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Form.DefWndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.ScrollableControl.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Form.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef)
at System.Windows.Forms.NativeWindow.Callback(IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG ByRef, System.Runtime.InteropServices.HandleRef, Int32, Int32, Int32)
at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
at System.Windows.Forms.Application.Run()
at NHS.NeoIdentityAgent.Program.Main()
Is anyone aware of a similar issue that would cause .NET Runtime to error when PSADT is terminating processes?
