Jump to content

Malwarebytes Endpoint Protection Repair Script


Taylor9

Recommended Posts

I created a PowerShell script a few months back to automate the repair of Malwarebytes Endpoint Protection and thought I would share.

If you ever notice that your endpoints are not communicating with the Cloud or you have service issues etc, the script should be able to repair the issue remotely and silently. If there is an issue with the machines cloud config, I also programmed it to run the built in recovery tool ("C:\Program Files\Malwarebytes Endpoint Agent\ConfigurationRecoveryTool.exe"). In my experience the script can resolve most of the issues I have encountered. Below is a screen shot of the script in action and I hope it is helpful!

 

What it does:

  1. iterates through list of computer hostnames in a csv file and make sure the computer exists in AD
  2. check if the machine is online
  3. remote connect via PSSession
  4. make sure the cloud version is installed
  5. check if the update file still exists in a directory, if so there is a pending software update, your services will not run fully until you reboot the system
  6. check the two services start types and make sure they are set to automatic
  7. attempt to start the services
  8. if the MBEndpointAgentStatus service fails to start, run the Malwarebytes configuration recovery tool and attempt to restart the service again
  9. validates the computer can see the Malwarebytes cloud site

 

Requirements: AD windows environment, PowerShell v5 and ps remoting must be enabled

 

Instructions and code: https://github.com/taylornrolyat/Repair-MalwarebytesCloud
 

repair example.jpg

 

 

Link to post
Share on other sites

  • 1 year later...

Thanks for the script but i am a little lost on how to use it, where do i put in the path info so the script knows where to pull from?  The instructions really dont help much in terms of setup, an example of what the script looks like setup would be very helpful, sorry i am not the best at powershell.. 

Link to post
Share on other sites

Thanks for the reply, but I do have the list folder and everything else in the same folder but when i run it i get Path is Null cant find file, so my question is do i need to change any sort of path locations within the script? because just running the script in the folder doesnt seem to work for me.

Link to post
Share on other sites

The path is set on lines 36,37. It could be that your version of powershell doesn't support $MyInvocation. 

In that case, you could change this on line 37:

$fixList = "$scriptFolderRoot\list.csv"

To something like this:

$fixList = "C:\users\yourusernamehere\Desktop\MWBScript\list.csv"

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
Back to top
×
×
  • Create New...

Important Information

This site uses cookies - We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.