none
SMB 1.0 not disabled RRS feed

  • Question

  • We have a few servers with Windows Server 2012R2 Standard and Essentials. We uninstalled SMB1 SMB 1.0/CIFS File sharing support. When we run command below, it says SMB 1 is still enabled. 

    Get-SmbServerConfiguration | Select EnableSMB1Protocol

    PS C:\Users\dboudreauA> Get-SmbServerConfiguration | Select EnableSMB1Protocol

                                                                                                                                                                                                                      EnableSMB1Protocol
                                                                                                                                                                                                                      ------------------
                                                                                                                                                                                                                                    True

    If I run command below it does not allow me to disable it as the feature is uninstalled.

    PS C:\Users\dboudreauA> Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol
    Disable-WindowsOptionalFeature : The requested operation requires elevation.
    At line:1 char:1
    + Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Disable-WindowsOptionalFeature], COMException
        + FullyQualifiedErrorId : Microsoft.Dism.Commands.DisableWindowsOptionalFeatureCommand

    Any idea what is going on as I did restart the servers a few times but it still showing SMB 1.0 is enabled.

    Wednesday, January 22, 2020 8:29 PM

Answers

All replies

  • Hi,

    The following command requires you to run as administrator:

    Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol


    Once that is done, to detect if SMBv1 is enabled or disabled, run the following command:

    Get-WindowsOptionalFeature –Online –FeatureName SMB1Protocol

    How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows
    https://docs.microsoft.com/en-us/windows-server/storage/file-server/troubleshoot/detect-enable-and-disable-smbv1-v2-v3

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    Wednesday, January 22, 2020 9:09 PM

  • You may also want to forcibly disable it across the entire server by disabling it in the registry.

    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 –Force

    Note You must restart the computer after you make these changes.

    For Reference:

    Detect - Get-Item HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters | ForEach-Object {Get-ItemProperty $_.pspath}

    Default configuration = Enabled (No registry key is created), so no SMB1 value will be returned

    Disable - Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 –Force

    Enable - Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 1 –Force

    Thanks,

    Scott
    • Edited by CloudDawson Wednesday, January 22, 2020 9:17 PM
    Wednesday, January 22, 2020 9:16 PM
  • What is the easiest way to disable SMP 1 in Windows server 2008R2 and Windows 2019? Would I run the same command as below on both server OS versions?

    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 –Force

    Thursday, January 23, 2020 12:03 AM
  • Hi,

    >>What is the easiest way to disable SMP 1 in Windows server 2008R2 and Windows 2019?

    You can disable SMB1.0 on your server.

    Like the picture:


     

    >>Would I run the same command as below on both server OS versions?

    If the first way failed, You can try to use the following command.

    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 Force

     

    You can refer the following article for more methods:

    https://www.thewindowsclub.com/disable-smb1-windows

    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

     

    Hope this can help you, if you have anything unclear, please let me know.

    Have a nice day!

    Ellen



    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Thursday, January 23, 2020 3:21 AM
  • What is the easiest way to disable SMP 1 in Windows server 2008R2 and Windows 2019? Would I run the same command as below on both server OS versions?

    Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 –Force

    The registry key is the easiest way, but it requires a reboot, this is mentioned in the link I posted previously.

    How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows


    Blog: https://thesystemcenterblog.com LinkedIn:

    • Marked as answer by bubba19831983 Friday, January 24, 2020 1:36 AM
    Thursday, January 23, 2020 6:49 AM
  • Hi,

    You could mark the useful reply as answer if you want to end this thread up.

    If there is anything else we can do for you, please feel free to post in the forum.

    Best Regards,

    Ellen


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, January 24, 2020 1:39 AM