Customization need for run the powershell script

Hi All,

I have a powershell script for installing nagios client, in that for installation we have to use below format in cmd mean, it is installing the agent with success status,

"C:\Windows\system32>cd/

C:>cd “Program Files (x86)\BigFix Enterprise\BES Client\Nagios”

C:\Program Files (x86)\BigFix Enterprise\BES Client\Nagios>powershell -file MHAS
-Monitoring-Install-Script.ps1 xxxxxxx xx.xx.xx.xxx
Installing nscp agent
Installing ncpa agent
Creating config files

C:\Program Files (x86)\BigFix Enterprise\BES Client\Nagios> "

is there any action script for running the same using fixlet language?

Please advice me the same,

Thanks,
Nagarajan,

Hi all,

I have an error like below while ran the powershell file with below command in fixlet debuger,

$40136DB22FA0C8B4

command in debugger

wait cmd.exe /c powershell -file “C:\Program Files (x86)\BigFix Enterprise\BES Client\Nagios\MHAS-Monitoring-Install-Script.ps1”

Is there any way to avoid the error ?

if i run the below command i got different error like screen shot below

Command,

wait cmd.exe /k powershell.exe -Executionpolicy Bypass -file “C:\Program Files (x86)\BigFix Enterprise\BES Client\Nagios\MHAS-Monitoring-Install-Script.ps1”

or

wait cmd.exe /C powershell.exe -Executionpolicy Bypass -file “C:\Program Files (x86)\BigFix Enterprise\BES Client\Nagios\MHAS-Monitoring-Install-Script.ps1”

error screen shot

$1308DD69CE7F6F36

Hi All,

we can find the another solution for run the powershell script on endpoints, we had created the bat file and in that bat file we run from our fixlet action script,

it was working and installed the nagios agent successfully,

Thanks,

Try using
action uses wow64 redirection false
Anywhere in the script before you run the command.

Since besclient is 32-bit, by default it would also use 32-bit powershell and “program files (x86)” would not exist.

Sure @JasonWalker

Thank you,