The Automox agent is a 32-bit application and runs 32-bit PowerShell by default. If you are wanting to pass 64-bit PowerShell code through an Automox worklet, you can do so by using a scriptBlock with the following format:
$scriptBlock = { YOURCODEHERE }
$exitCode = & "$env:SystemRoot\sysnative\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -WindowStyle Hidden -NoProfile -NonInteractive -Command $scriptBlock
Comments
0 comments
Article is closed for comments.