I found this issue when I was testing 4.1.8 with Set-ADTRegistryKey.
The logs correctly show that the registry keys are created and set at the expected path.
<![LOG[[Post-Install] :: Setting registry key value: [Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\TestCompany\Applications\Test_E2E-Monitoring_1.0.0.0_EN_x64_09] [Name = E2E-Monitoring].]LOG]!><time="14:35:21.073+60" date="8-12-2026" component="Set-ADTRegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="7340" file="C:\WINDOWS\IMECache\743c15d5-37fa-4801-954d-e5f1087ff5cc_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
However, when I open the Registry Editor and browse to the expected path, the key does not exist.
I was eventually able to find the key at:
HKEY_LOCAL_MACHINE\Software\WOW6432Node\TestCompany\Applications\Test_E2E-Monitoring_1.0.0.0_EN_x64_09
The old Application Template using PSAppDeployToolkit 4.0.5 did not behave this way and worked as expected. The new 4.1.8 template is almost identical.
I tested the same application on the same Windows 11 test VM:
Windows 11 10.0.26200 x64
The issue only occurs when the application is installed through Company Portal from Intune.
In Intune, the installation is configured as follows:
Install Behaviour: System
Install Command:
%SystemRoot%\System32\WindowsPowerShell\v1.0\PowerShell.exe -ExecutionPolicy Bypass -NoProfile -File Invoke-AppDeployToolkit.ps1 -DeploymentType Install -DeployMode Silent
When I run the exact same install command through PSExec64 on my machine, the registry key is correctly written to the 64 bit registry path.
Registry Branding
We set our application branding through a function in PSAppDeployToolkit.Extensions\PSAppDeployToolkit.Extensions.psm1. This is where Set-ADTRegistryKey is used for all of our applications.
[string]$appScriptVendor = "$($config.Toolkit.CompanyName)"
[string]$appPackageName = "$($adtSession.AppVendor)_$($adtSession.AppName)_$($adtSession.AppVersion)_$($adtSession.AppLang)_$($adtSession.AppArch)_$($adtSession.AppRevision)" -replace '\s', '-'
function Set-RegistryBranding {
[CmdletBinding()]
param (
[Parameter(Mandatory = $false)]
[ValidateNotNullOrEmpty()]
[System.Int32]$ExitCode = 0
)
$registryBrandingEntries = Switch ($adtSession.DeploymentType) {
{ $_ -in 'Install', 'Repair' } {
[ordered]@{
'Name' = $adtSession.AppName
'Publisher' = $adtSession.AppVendor
# [...]
Default {
[ordered]@{
'Status' = 'Unkown'
}
}
}
$regHive = if ($IsAdmin -or $IsLocalSystemAccount) { 'HKLM' } else { 'HKCU' }
$registryBrandingEntries.GetEnumerator() | % {
Set-ADTRegistryKey -Key "$regHive\SOFTWARE\$appScriptVendor\Applications\$appPackageName" -Name $_.Name -Type String -Value $_.Value
}
}
I am aware that Set-ADTRegistryKey has a -Wow6432Node option. However, this option defaults to false and we do not set it anywhere in our code.
Difference between PSAppDeployToolkit 4.0.5 and 4.1.8
When comparing the logs from the old and new templates, I noticed that the following line is present in the 4.1.8 template but was not present in the 4.0.5 template:
<![LOG[[Initialization] :: PowerShell Process Path is [C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\PowerShell.exe].]LOG]!><time="14:05:46.330+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
The same log also reports:
<![LOG[[Initialization] :: PowerShell Version is [5.1.26100.8457 X86].]LOG]!><time="14:05:46.326+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
This appears to indicate that PSAppDeployToolkit is running under the 32 bit version of Windows PowerShell.
For comparison, when I run the same installation locally, the PowerShell process path is the 64 bit version:
<![LOG[[Initialization] :: PowerShell Version is [5.1.26100.8875 X64].]LOG]!><time="15:52:15.299+60" date="8-12-2026" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="57104" file="C:\Git\UEM\WindowsClientManagement\PSADT4_SPIRIT21_Template\src\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: PowerShell Process Path is [C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe].]LOG]!><time="15:52:15.302+60" date="8-12-2026" component="Open-ADTSession" context="NT AUTHORITY\SYSTEM" type="1" thread="57104" file="C:\Git\Template\src\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
The local installation correctly writes the registry key to the expected 64 bit path.
The relevant 4.1.8 initialization log is:
<![LOG[[Initialization] :: [Invoke-AppDeployToolkit.ps1] script version is [4.1.8].]LOG]!><time="14:05:46.269+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: The following parameters were passed to [Invoke-AppDeployToolkit.ps1]: [-DeploymentType:'Install' -DeployMode:'Silent'].]LOG]!><time="14:05:46.276+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] module version is [4.1.8].]LOG]!><time="14:05:46.278+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] module imported in [7,6678661] seconds.]LOG]!><time="14:05:46.283+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] module initialized in [8,2788576] seconds.]LOG]!><time="14:05:46.286+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] module path is ['C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit'].]LOG]!><time="14:05:46.290+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] config path is ['C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\Config'].]LOG]!><time="14:05:46.292+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] string path is ['C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\Strings'].]LOG]!><time="14:05:46.296+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: [PSAppDeployToolkit] session mode is [Native].]LOG]!><time="14:05:46.300+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Computer Name is [TSTWCAP005].]LOG]!><time="14:05:46.302+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Current User is [NT-AUTORITÄT\SYSTEM].]LOG]!><time="14:05:46.306+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: OS Version is [Microsoft Windows 11 Enterprise X64 10.0.26200.8457].]LOG]!><time="14:05:46.310+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: OS Type is [WorkStation].]LOG]!><time="14:05:46.312+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Hardware Platform is [Physical].]LOG]!><time="14:05:46.316+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Current Culture is [de-DE], language is [DE] and UI language is [DE].]LOG]!><time="14:05:46.320+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: PowerShell Host is [ConsoleHost] with version [5.1.26100.8457].]LOG]!><time="14:05:46.324+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: PowerShell Version is [5.1.26100.8457 X86].]LOG]!><time="14:05:46.326+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: PowerShell Process Path is [C:\WINDOWS\SysWOW64\WindowsPowerShell\v1.0\PowerShell.exe].]LOG]!><time="14:05:46.330+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: PowerShell CLR (.NET) version is [4.0.30319.42000].]LOG]!><time="14:05:46.334+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: The following users are logged on to the system: [INTERN\tony.stark].]LOG]!><time="14:05:46.338+60" date="8-12-2026" component="Open-ADTSession" context="NT-AUTORITÄT\SYSTEM" type="1" thread="8944" file="C:\WINDOWS\IMECache\2bf811c4-a139-4d06-96e1-2846c95b4d38_1\PSAppDeployToolkit\PSAppDeployToolkit.psm1">
<![LOG[[Initialization] :: Session information for all logged on users:
Expected behaviour
The application should write the registry values to:
HKEY_LOCAL_MACHINE\Software\TestCompany\Applications\Test_E2E-Monitoring_1.0.0.0_EN_x64_09
The registry values should not be redirected to:
HKEY_LOCAL_MACHINE\Software\WOW6432Node\TestCompany\Applications\Test_E2E-Monitoring_1.0.0.0_EN_x64_09
Questions
Could the SysWOW64 PowerShell process be causing the registry redirection?
Why is the 4.1.8 template being executed using thee x86 version of Windows PowerShell when the Intune install command explicitly calls
%SystemRoot%\System32\WindowsPowerShell\v1.0\PowerShell.exe
Any guidance on why Set-ADTRegistryKey is writing to WOW6432Node in this scenario would be appreciated.