Running 64-bit PowerShell Scripts in the ConfigMgr 2012 Environment

Due to a license server change, I needed to update a registry on a list of systems to point to the new server name.

Simple, use a PowerShell script to update it! In testing, all seems to work fine, however, when packaging the script as a Program in a Package. The wow64node is the only key the seems to get updated.

Set-ItemProperty -Path $_ -Name ‘SERVERNAME’ -Value $newServerName -Force


I was scratching my head for a while on this until i found this blog back from 2013! Thanks Phil Schwan!

After changing the PS call to use the one in the SysNative, my script started to work gas expected!

%WINDIR%\sysnative\WindowsPowerShell\v1.0\powershell.exe

TIL: Running 64-bit PowerShell Scripts in the ConfigMgr 2012 Environment