1

enter image description hereWondering whether anyone has come across this and been able to find a workaround. When I try to run Import-Module dbatools (or any of the functions within the dbatools module), it is blocked by Carbon Black Cloud. The error in the ISE includes the text: "This script contains malicious content and has been blocked by your antivirus software." It happens on machines where it used to run. I happens even after I pull down a fresh copy of dbatools for their GitHub repo. I tried the tack of installing the module (vs importing the module) and that worked, but the functions are still blocked when I try to run them. It only seems to happen on Windows Server 2019 (Carbon Black ignores it on Windows Server 2016).

In case it matters, dbatools is digitally signed.

  • I'd look into setting an exception in Carbon Black for the directory that the dba module is installed in. – RetiredGeek Jun 02 '22 at 23:42
  • As RetiredGeek suggests, contact your Carbon Black administrators to provide an exception. Since the **dbatools** module is digitally signed, consider excluding other modules code-signed by the same certificate publisher, if it's from a trusted vendor. – leeharvey1 Jun 05 '22 at 15:26

1 Answers1

0

Based on my experience, I was able to get around using following workarounds:

  • For dbatools 1.x, add digital signature to "approved cert" on UI/console.
  • For dbatools 2.x; use a wrapper script to launch powershell_ise or powershell and give a full bypass to that BAT script from UI/console.

PS: Not a security advice. Just a workaround to work through.

Aman ZeeK Verma
  • 173
  • 1
  • 1
  • 7