Carbon Black Cloud blocking dbatools module

553 Views Asked by At

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.

1

There are 1 best solutions below

0
On

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.