Packages/Programs Launch as x86
Hello, I am currently running Configuration Manager 2012 SP1. I am trying to run some Powershell scripts executed via Packages/Programs and am having an issue. The script I am running only works in x64 Powershell, I am finding that Configuration
Manager is launching the x86 version when I use the following command in a program "Powershell.exe -NoProfile -File MyScript.ps1". Therefore, in order for my script to work, I have to use this command "%systemroot%\sysnative\windowspowershell\v1.0\powershell.exe
-NoProfile -File RemoveWMIRepositoryFolders.ps1". My understanding is that in Configuration Manager 2012 (RTM and SP1) that the client is supposed to be x64 and hence therefore, not require use of sysnative, etc. when launching programs. Can
anyone confirm this behavior? Thanks!
February 11th, 2013 9:37pm
The client is a 64-bit client (mostly) but does contain legacy 32-bit code including the package/program execution functionality which to my knowledge was not touched (or touched minimally) for this release.
What you've listed above works well as long you don't try to run it on a 32-bit system because sysnative doesn't exist on 32-bit systems.
February 11th, 2013 10:17pm
Jason, thanks for the reply and for providing such great information (especially since documentation is not very clear on this matter). It is unfortunate to hear that the x86/x64 issues still partly exist in ConfigMgr 2012. Any word if the
next version will resolve this? At least it is workable with sysnative, just not as ideal, esp. since Packages/Programs are far more ideal than the Application model for things like PowerShell scripts. Thanks!
February 12th, 2013 1:40pm
Any word if the next version will resolve this?
Not that I am aware of.
February 12th, 2013 1:52pm
I'd suggest filing a Design Change Request on Connect. There are multiple ways they could attack this if it's given priority but until it's on their radar, they won't do anything about it.
February 12th, 2013 2:26pm
February 12th, 2013 2:46pm
Is using the full path
["%systemroot%\sysnative\windowspowershell\v1.0\powershell.exe
-NoProfile -File MyFile.ps1] force the use of 64 bit PowerShell the same as selecting to disable 64-bit file system redirection or are there differences?
-
Edited by
Tony Chirillo
13 hours 34 minutes ago
June 18th, 2015 2:18pm
Yes, using sysnative should force use of the 64-bit PowerShell.
June 18th, 2015 2:42pm
Using
Disable 64-bit file system redirection
does the same too? Is that correct? Is there a better practice between the two methods or just personal preference?

June 18th, 2015 2:53pm
To my knowledge, it will effectively do the same thing but keep in mind that sysnative is not valid on 32-bit OSes.
June 18th, 2015 8:41pm
To my knowledge, it will effectively do the same thing but keep in mind that sysnative is not valid on 32
June 18th, 2015 10:07pm