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.

Developer
  • Name: Douglas Sanchez
  • Company: Kaseya
  • Website: http://www.kaseya.com
  • Contact Developer
  • Summary
  • Check and Disable SMB1 Protocol
  • 203 Downloads
  • Released on June 27th, 2017
  • 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 11 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 11 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 11 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 11 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 11 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 11 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 11 months ago

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

    Gravatar for Corey Crossman
    Corey Crossman 11 months ago

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

    Gravatar for Gene Berkinsky
    Gene Berkinsky 11 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 11 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 11 months ago

    where do you create the custom field required?

    Gravatar for Douglas Sanchez
    Douglas Sanchez 11 months ago

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

    Gravatar for Douglas Sanchez
    Douglas Sanchez 11 months ago

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

    Gravatar for Tom Johsnon
    Tom Johsnon 4 months ago

    i can not get the status added to a report

    Gravatar for Tom Johsnon
    Tom Johsnon 4 months ago

    i can not get the status added to a report

    Gravatar for Douglas Sanchez
    Douglas Sanchez 4 months ago

    @Tom, you need to create a new report part from the Audit Module using the Machine Summary part. In there you can display any column you want, and slide the Custom Field you need to the Columns you wanted to display. On older version of the VSA, the custom fields' names are not edited and will show Custom Field 00, 01, 02 ... In this case I recommend creating a report part with all Custom Fields so that you know which one correspond to the one you need.