Running 64-bit PowerShell Scripts in the ConfigMgr 2012 Environment

Ian SantillanIan Santillan
1 min read

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

0
Subscribe to my newsletter

Read articles from Ian Santillan directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ian Santillan
Ian Santillan

Data Architect ACE - Analytics | Leading Data Consultant for North America 2022 | Global Power Platform Bootcamp 2023 Speaker | Toronto CDAO Inner Circle 2023