Advertisement
LieToMe

enableSMBv1/v2.bat [win10]

Mar 18th, 2021 (edited)
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. powershell.exe -Command "Set-SmbServerConfiguration -EnableSMB1Protocol $true -Force"
  2. powershell.exe -Command "Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol"
  3. powershell.exe -Command "Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Server"
  4. powershell.exe -Command "Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client"
  5. powershell.exe -Command "Set-SmbServerConfiguration -EnableSMB2Protocol $true -Force"
  6. powershell.exe -Command "Set-SmbClientConfiguration -EnableBandwidthThrottling 0 -EnableLargeMtu 1"
  7. netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes
  8. netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes
  9. netsh firewall set service type=fileandprint mode=enable profile=all
  10. dism /online /norestart /enable-feature /featurename:SMB1Protocol
  11. reg add HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters /v AllowInsecureGuestAuth /t reg_dword /d 00000001 /f
  12. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\LanmanWorkstation" /v "AllowInsecureGuestAuth" /t REG_DWORD /d "0x1" /f
  13. reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Browser\Parameters" /v IsDomainMaster /t REG_SZ /d True /f
  14. reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Browser\Parameters" /v MaintainServerList /t REG_SZ /d Yes /f
  15. Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Notifications\OptionalFeatures\SMB1Protocol" /v "Selection" /t REG_DWORD /d "0x1" /f
  16. Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Notifications\OptionalFeatures\SMB1Protocol-Client" /v "Selection" /t REG_DWORD /d "0x1" /f
  17. Reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Notifications\OptionalFeatures\SMB1Protocol-Server" /v "Selection" /t REG_DWORD /d "0x1" /f
  18. reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\LanmanServer\Parameters" /v "SMB2" /t REG_DWORD /d "0" /f
  19. sc.exe config lanmanworkstation depend= bowser/mrxsmb10/nsi
  20. sc.exe config mrxsmb20 start= disabled
  21. @echo Checking SMBv1/v2 is enabled
  22. sc.exe qc lanmanworkstation
  23. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement