PowerShell File Not Getting Executed from Action

(imported topic written by Senthilnathan Manoharan)

Hello Friends

I am back with yet another question.

I’ve created a fixlet to remediate IIS website configuration.

The ACTION part of the fixlet is giving problems.

I am able to create the powershell file using “createfile” but the file is not getting executed

I am able to execute the same file locally from command prompt on the client but problem is while executing it from fixlet.

Is there any permission problem that I am overlooking ?

Steps I’ve taken

  1. Tested the action block using debugger with same result
  2. I am able to execute a different powershell script NOT CREATED IN ACTION BLOCK. (I pushed a test PS file using fixlet and executed the same which is working)
  3. I am able to execute the script locally in client

Your suggestions are much appreciated.

Script Block

parameter “healthCheckFolder” = “{parent folder of windows folder }\Middleware”

parameter “PowerShellexe” = “{ pathname of system folder }\windowspowershell\v1.0\powershell.exe”

waithidden “{parameter “PowerShellexe”}” -file “{parameter “healthCheckFolder”}\physicalPathRemediation.ps1”

//PowerShell Script Execution

Thanks

Senthil Nathan M

(imported comment written by Senthilnathan Manoharan)

I found the answer.

Rookie mistake:

I missed the following line

action uses wow64 redirection {not x64 of operating system}

I am able to execute the action block after adding this line

Thanks

Senthil Nathan M