How to Test a PowerShell Script Locally for Worklets

Run a PowerShell script locally for Worklets with Automox parameters

When testing a PowerShell script on a local device, running it with the same parameters that Automox uses will help validate the script for worklet use. Automox uses 32-bit and runs as the System account.

Requirements

  • Download PsTools from Microsoft:
  • Use psexec to run as the local System account: 
    psexec -s SCRIPT_GOES_HERE
    • psexec requires that an End-User License Agreement be accepted on first use. This can be done with the following command: 
      psexec -accepteula
  • When testing scripts, ensure that you are running the 32-bit version of PowerShell with either:
    • Windows PowerShell (x86)
    • Windows PowerShell ISE (x86)
Was this article helpful?
0 out of 0 found this helpful