PowerShell Script (.PS1) Deployment through EM Module

Modified on Mon, 6 Oct at 8:00 AM

Product Version: 6.5.0.0


Overview

This article provides detailed steps to deploy a PowerShell script (.PS1) using the Endpoint Management (EM) module in SecPod. This method allows administrators to distribute and execute scripts across multiple endpoints efficiently.


Solution

To deploy a PowerShell script using SecPod, follow the steps below:

1. Prepare the Script for Deployment

  • Place the PowerShell script (.PS1) into a ZIP file.

  • Ensure the script is tested locally before deployment.

2. Upload the Script to SecPod

  1. Navigate to EM → Actions → Software Deployment.

  2. Click the Upload button.

  3. Select Compressed (ZIP/GZIP/TAR) Installer Package.

  4. Upload the ZIP file containing the PowerShell script.

3. Edit the Uploaded Package

  1. Locate the uploaded script under the User Uploaded section.

  2. Click the Exclamatory icon to edit the package.

4. Update Required Fields

Ensure the following fields are configured:

  • Silent Option: Not required for PS1 scripts.

  • Extract Location: Specify the folder where the script should be extracted.

  • Run File Name: Enter the name of the PowerShell script file.

5. Install the Script

  1. Select the uploaded ZIP file and click the Install icon.

  2. Choose the target devices for deployment and click Next.

  3. Provide task details such as Task Name, Schedule, etc., and click Create Installation Task.


6. Handling PowerShell Execution Policy

PowerShell scripts may be restricted from running due to execution policies. You can handle this in two ways:


Option 1: Set Execution Policy Manually on Target Device

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force


Option 2: Include Execution Policy Bypass in Script
Add the following line at the beginning of your script:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force



Conclusion

By following the above steps, administrators can successfully deploy PowerShell scripts across multiple endpoints using the SecPod EM module. Ensure that execution policies are properly handled to allow smooth execution of scripts on target devices.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article