Run Powershell Script with BigFix

Hi All,

Can anyone advise can use the below command to run the power shell on any of the windows server irrespective of os version and powershell version. if this will not help can you please suggest the correct command line to inculde in action script.

Currently using in my fixlet :

else {“Enter Script type” = “ps1”}
waithidden “C:\Windows\SysNative\WindowsPowerShell\v1.0\PowerShell.exe” -NonInteractive -NoLogo -file “C:\Windows\Temp{parameter “strFlowExecID”}_{parameter “strScriptName”}.{parameter “strScriptType”}” “{parameter “strFlowExecID”}” “”{parameter “strAttributes”}“”

i want to use the below line so that can run the fixlet on any of the powershell version and OS version.

thanks
Naresh

1 Like

There are lots of examples out there, but start here:

If you have a very simple powershell command, this is an option:


Related: https://bigfix.me/analysis/details/2994540

1 Like

There are some occasions and certain commandlets where 32-bit or 64-bit Powershell is required specifically. In those cases, when the action is running on a 64-bit OS, you might need relevance to use the appropriate one.

That is actually handled by the following:

action uses wow64 redirection {not x64 of operating system}

If you don’t use that line, then it will always use 32bit powershell. If you use that line, then it will use 32bit powershell on 32bit systems and 64bit powershell on 64bit systems. You just have to comment out that line if you need it to always use 32bit powershell.