Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror

Submission Summary: 0 pending, 7 declined, 0 accepted (7 total, 0.00% accepted)

×
Windows

Submission + - Disable NetBIOS or set MTU in registry via GPO?

An anonymous Frank writes: "You want to reduce the MTU, or disable NetBIOS on Windows Targets?

You look around and you can't find a Policy to do it, and you quickly find out that these registry keys are located under each interface, who's names or IDs change from node to node. You search on the net and can only find rumours of having to get some script to do it for you...

Well, a little bit of VBScripting training later, and I've got this script going that will find your NICs and push those registry keys for you, all you now need to do is add it to the COMPUTER startup scripts policy in a GPO:

--begin--
OPTION EXPLICIT
ON ERROR RESUME NEXT

Dim objShell
Dim BindKey, BindarrValues, BindstrValue, BindItem
Dim BindstrValuePrefix, BindstrValuePrefixLen, BindstrValueUIDPrefix

BindKey = "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Link age\Bind"
BindstrValuePrefix = "\Device\"
BindstrValuePrefixLen = Len(BindstrValuePrefix)
BindstrValueUIDPrefix = "{"

Set objShell = WScript.CreateObject("WScript.Shell")
BindarrValues = objShell.RegRead (BindKey)
For Each BindstrValue In BindarrValues
BindItem = Mid(BindstrValue, BindstrValuePrefixLen + 1, Len(BindstrValue) - BindstrValuePrefixLen)
    If Mid(BindItem, 1, 1) = BindstrValueUIDPrefix Then
        'Set Maximum MTU
        objShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Para meters\Interfaces\" + BindItem + "\MTU", 1300, "REG_DWORD"
        'Disable NetBIOS over Tcpip
        objShell.RegWrite "HKLM\SYSTEM\CurrentControlSet\Services\NetBT\Para meters\Interfaces\Tcpip_" + BindItem + "\NetbiosOptions", 2, "REG_DWORD"
        'Wscript.Echo BindItem
    Else
        'To be ignored, i.e., NdisWanIp
    End If
Next
wscript.quit
--end--"

Slashdot Top Deals

So you think that money is the root of all evil. Have you ever asked what is the root of money? -- Ayn Rand

Working...