CODE: [Copy to clipboard]
:: Disable Simple Sharing
%SystemRoot%\System32\REG add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\SimpleSharing" /f /v "DefaultValue" /t REG_DWORD /d 0
:: Configure netshare
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /f /v "restrictanonymous" /t REG_DWORD /d 0
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /f /v "restrictanonymoussam" /t REG_DWORD /d 1
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /f /v "forceguest" /t REG_DWORD /d 0
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Control\Lsa" /f /v "limitblankpassworduse" /t REG_DWORD /d 0
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters" /f /v "autoshareserver" /t REG_DWORD /d 1
%SystemRoot%\System32\REG add "HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" /f /v "AutoShareWks" /t REG_DWORD /d 1