Check and Disable SMB1 Protocol

Procedures to check and disable SMB1

Description

This listing contains two agent procedures:
-Check SMB1 Status
-Disable SMB1 Protocol
The first one requires to create a custom field named "SMB1 Status" prior to scheduling the procedure. It will then check the SMb1 status and update the custom field with "Enabled" or "Disabled"
The second procedure will disable the SMB1 protocol on the endpoint. It will only take effect after the endpoint has been restarted. The restart is not included in the procedure to give the liberty of scheduling it at the best time.
Make sure you are not actively using the SMB1 protocol prior to running the procedure.
Disclaimer: This procedure is not intended to be used on Windows XP. The Workstation service will not be able to start once one of the registry keys get changed.

Categories
Developer
  • Name: Douglas Sanchez
  • Company: Kaseya
  • Website: http://www.kaseya.com
  • Contact Developer
  • Summary
  • Check and Disable SMB1 Protocol
  • 164 Downloads
  • Released on June 27th, 2017
  • Average Rating

    4.50stars

    Rating Breakdown
    2 total reviews

    1
    1 5 stars reviews.
    1
    1 4 stars reviews.
    0
    0 3 stars reviews.
    0
    0 2 stars reviews.
    0
    0 1 star reviews.
    Reviews
    Gravatar for Nick
    by Nick on June 30th, 2017

    Works great, thanks

    Gravatar for Nick
    by Nick on June 28th, 2017

    nice and simple script. appreciate the effort of the Kaseya team to put things like this together

    Discussion
    Gravatar for CustomTec
    CustomTec 3 months ago

    Hi I ran the SMB check procedure and got an errors saying "Get variable, with error File Open failed, get content from file c:\agentdirectory\SMBStatus.txt. I'll look into fixing this in our download

    Gravatar for Gene Berkinsky
    Gene Berkinsky 3 months ago

    The script fails on the line: getVariable("File Content", "#vAgentConfiguration.agentTempDir#\SMBStatus.txt", "smbstatus", "All Operating Systems", "Halt on Fail") Is there a fix for this?

    Gravatar for Gene Berkinsky
    Gene Berkinsky 3 months ago

    The script fails on the line: getVariable("File Content", "#vAgentConfiguration.agentTempDir#\SMBStatus.txt", "smbstatus", "All Operating Systems", "Halt on Fail") Is there a fix for this?

    Gravatar for Gene Berkinsky
    Gene Berkinsky 3 months ago

    The script fails on the line: getVariable("File Content", "#vAgentConfiguration.agentTempDir#\SMBStatus.txt", "smbstatus", "All Operating Systems", "Halt on Fail") Is there a fix for this?

    Gravatar for Douglas Sanchez
    Douglas Sanchez 3 months ago

    I was troubleshooting this issue and found out it is due to the Registry Key related to SMB1 missing on the system. By default, if the Key is missing, SMB1 is enabled as it considers its value to be 1. I will edit the procedure to return "Enabled" when the registry key is missing.

    Gravatar for Douglas Sanchez
    Douglas Sanchez 3 months ago

    I just updated the procedure with some additional logic to specify SMB1 is enabled in case the registry key is missing.

    Gravatar for Corey Crossman
    Corey Crossman 3 months ago

    Work great, success on all my systems! Thanks Douglas!

    Gravatar for Corey Crossman
    Corey Crossman 3 months ago

    Worked great, success on all my systems! Thanks Douglas!

    Gravatar for Gene Berkinsky
    Gene Berkinsky 3 months ago

    Thank you for the update. I tried again and it only works with Windows 10, and Server 2012/2016.

    Gravatar for Jason Paradis
    Jason Paradis 3 months ago

    The check script errors out on Windows 7 64 bit with the error "Failed THEN in step 9 (Line 15).

    Gravatar for MICHAEL CARBONARO
    MICHAEL CARBONARO 3 months ago

    where do you create the custom field required?

    Gravatar for Douglas Sanchez
    Douglas Sanchez 3 months ago

    Michael, you can create the Custom Field in the Audit module under Machine Summary.

    Gravatar for Douglas Sanchez
    Douglas Sanchez 3 months ago

    Michael, you can create the Custom Field in the Audit module under Machine Summary.