Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This script will scan through all enabled NICs and disable Netbios Over TCP/IP
###########################################################################
#
# NAME: DisableNetBiosOverTcpIp.ps1
#
# AUTHOR: aamaral
#
# COMMENT: This script will scan through all enabled NICs and disable Netbios Over TCP/IP
#
# VERSION HISTORY:
# 1.0 18/05/2015 - Initial release
#
###########################################################################
$adapters=$null
$adapters=(gwmi win32_networkadapterconfiguration -Filter 'ipenabled = "true"')
Foreach ($nic in $adapters | where-object {$nic.TcpipNetbiosOptions -ne 2} ) {
$nic.settcpipnetbios("2")
}
Write-EventLog -LogName Application -Source ComplianceNebiosDisabled -EntryType Information -EventID 501 -Message NetBIOS over TCP/IP have been DISABLED by remediation script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment