Skip to main content

Error "PowerShell script contains malicious content and has been blocked by antivirus software" while Executing PowerShell Scripts in TimeXtender Orchestrator

  • February 17, 2025
  • 0 replies
  • 99 views

Symptoms

Error while executing PowerShell scripts in TimeXtender Orchestrator. Error Message received:

Error: PowerShell script contains malicious content and has been blocked by antivirus software.

Cause

The antivirus software on the server running the TimeXtender environment is blocking the execution of the PowerShell script due to it being flagged as containing malicious content.

Resolution

To resolve this issue, follow these steps:

  1. Understand the Execution Flow:

  • PowerShell scripts are executed externally from TimeXtender Classic.
  • The execution starts in the cloud and the PowerShell package is set to execute through the External Gateway.
  • The External Gateway polls every 10-60 seconds and picks up the script to be executed.
  • Depending on the configuration, the script is either executed on the External Gateway or queued for the Internal Gateway.
  1. Configure Antivirus Software:

  • Ensure that the antivirus software on the server running the TimeXtender environment is configured to allow the execution of the PowerShell scripts.
  • Add exceptions for the specific scripts or the directories where the scripts are stored.
  1. Verify Gateway Configuration:

  • Ensure that the External Gateway and Internal Gateways are correctly configured as per the environment setup.
  • The External Gateway should be running under an AD user that has access to the TimeXtender Classic Production environment.
  • The Internal Gateways should be running under different AD users that have access to the respective Test and Acceptance environments.
  1. Check Execution Policies:

  • Verify and update the PowerShell execution policies to ensure that the user executing the script has adequate permissions.
  • Use the following commands to check and set the execution policy:
Get-ExecutionPolicy
     Set-ExecutionPolicy RemoteSigned
  1. Install Required Modules:

  • Ensure that all required PowerShell modules are installed for the user running the script.
  • For example, to install the SqlServer module, use the following command:
Install-Module SqlServer -Scope CurrentUser -AllowClobber

Reference Links

Did this topic help you find an answer to your question?

0 replies

Be the first to reply!

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings