IT Management Suite

  • 1.  Run powershell Script invoking x64 version instead x86

    Posted Feb 14, 2024 04:55 AM
    Hello,

    I have a powershell script that is working perfectly but whenever I launch
    it in systems that have the two PS versions: x64 and x86, the script fails
    because the version used by default is the x86 one.

    My question is: Is there any way to specify in the script that the version
    to be used in the target system must be the x64 one? My scripts use
    commands not valid for x86 versions.

    Thanks a lot in advance.
    *Atiris: 8.6.1119*

    Best Regards / Saludos
    ___________________________

    PABLO LLORENTE ABAD


  • 2.  RE: Run powershell Script invoking x64 version instead x86

    Broadcom Employee
    Posted Feb 14, 2024 10:25 AM

    Hello Pablo!

    If you are using "Run Script" task for 'PowerShell' type, then it uses start command line powershell therefore means that it using default native Windows OS PowerShell and not any other versions of PowerShell installed there.

    Starting from ITMS 8.7.1 release, "Run Script" task allows to choose what 'PowerShell' version to use to run PS tasks on windows computers
    "PowerShell (any version)" will use command: %powershell%
    "PowerShell  Core" will use command: pwsh.exe
    "PowerShell Windows" will use command: powershell

    Did you try use your PS script as "script.ps1" file as Software package and deliver it with custom command line (to force required powershell version in command line) via MD policy or Quick delivery task?

    Best Regards,
    IP.