Skip to main content

Quirks in supporting ARM64 Windows OS in a CM Co-managed environment

The CM Client for ARM64 installs as 32-bit emulated.  This presents some unique issues for aspects of the CM Client components.

Issue(s) to be addressed (as experienced by 1 person, the author):

  1. Application installation logic and/or Detection logic, if using Powershell scripts, may run in 32-bit mode and fail to run as expected.
  2. Configuration Baselines, specifically Configuration Items which launch a Powershell script, will run in 32-bit mode. 
  3. Scripts Node scripts targeting ARM devices, where parameters are passed to the script.

1. For Application installation/detection logic, a couple of approaches.

  • Use two Deployment Types in the Application, one for ARM64 and one for the other 64-bit.  For the ARM64, you may need to EITHER test that the 32-bit installation on the 64bit OS is acceptable, or use a version of one of the attached 'relaunch as 64-bit' script to install.I
  • If you are co-managed, in the CM application, remove ARM64 as a valid OS for that Deployment Type.  This will mean that the application may be visible in Software Center, but will not be allowed to be installed.  Instead, make the application available in Intune, and instruct all ARM64 device users to install the application solely via Company Portal.
    • (additional note) If you use PSADT (Powershell Application Deployment Toolkit), remember to populate and test the if ARM section of Install and Uninstall sections of PSADT.

2. For Configuration Items which use Powershell as the detection logic, you may want to leverage something like the below.  See the -->attached link<-- and the script labeled 'ARM64-relaunchTemplateforCI.renametoPS1' as an example.  

------------

If (!([Environment]::Is64BitProcess)){
    if([Environment]::Is64BitOperatingSystem){
        Write-Verbose "Running 32 bit Powershell on 64 bit OS, restarting as 64 bit process..."
        $LogText = "Running 32 bit Powershell on 64 bit OS, restarting as 64 bit process..."
        Write-Log -Path $LogFilePath -Message ($LogText | Out-String) -Component $MyInvocation.MyCommand.Name -Type Info
        $arguments = "-NoProfile -ExecutionPolicy ByPass -WindowStyle Hidden -File `"" + $myinvocation.mycommand.definition + "`""
        $path = (Join-Path $Env:SystemRoot -ChildPath "\sysnative\WindowsPowerShell\v1.0\powershell.exe")
        
        $psi = New-Object System.Diagnostics.ProcessStartInfo
        $psi.CreateNoWindow = $true
        $psi.UseShellExecute = $false
        $psi.RedirectStandardOutput = $true
        $psi.RedirectStandardError = $true
        $psi.FileName = $path
        $psi.ARguments = $arguments
        $process = New-Object System.Diagnostics.Process
        $process.StartInfo = $psi
        $process.Start() | Out-Null
        $output = $process.StandardOutput.ReadToEnd()
        $process.WaitForExit()
        Write-verbose "finished x64 version of PS"
        $LogText = "finished x64 version of PS"
        Write-Log -Path $LogFilePath -Message ($LogText | Out-String) -Component $MyInvocation.MyCommand.Name -Type Info
        $LogText = "$output will be passed upon script exit"
        Write-Log -Path $LogFilePath -Message ($LogText | Out-String) -Component $MyInvocation.MyCommand.Name -Type Info
        $LogText = "============Ending================"
        Write-Log -Path $LogFilePath -Message ($LogText | Out-String) -Component $MyInvocation.MyCommand.Name -Type Info
        write-host $output
        Exit
    }else{
        Write-Verbose "Running 32 bit Powershell on 32 bit OS"
        $LogText = "Running 32 bit Powershell on 32 bit OS, the Powershell cmdlet of Get-LocalGroup is not available, this process cannot continue"
        Write-Log -Path $LogFilePath -Message ($LogText | Out-String) -Component $MyInvocation.MyCommand.Name -Type Info
        Exit
    }
}

---------------

3. For the Scripts node in CM, especially if you need to pass parameters to the relaunched script, see the -->attached link<-- labeled 'ARM64-relaunchTemplate-ScriptsNodeWithParameters.RenametoPS1'

---------------
This approach of re-launching as 64bit Powershell was stolen with pride from these resources:  
https://www.lieben.nu/liebensraum/2018/02/restarting-a-x86-powershell-process-as-x64-automatically/
https://stackoverflow.com/questions/11531068/powershell-capturing-standard-out-and-error-with-process-object

CMCB, PowerShell, SCCM, ConfigMgr

  • Created on .