To run a PowerShell script as a Win32 perform the following actions:

  • Wrap the PowerShell with the Intune wrap utility
  • Create a Win32 App in the MDM portal
  • Use as install command:
    • powershell.exe -executionpolicy bypass -windowstyle hidden -file PowershellScriptName.ps1
  • Finish of the appliciation