Is NetBIOS over TCP/IP Enabled?
As anyone who has typed 'ipconfig /all' knows, Windows has a lot of pesudo- and otherwise irrelevant network adapters that exist only as 'logcal entities'. The clause 'where IPEnabled='true'" will separate out the true TCP/IP adapters, but in some cases even they are but building blocks, such as HP's Team adapter. So, we can have a server with multiple adapters, and we want to know which one has NetBIOS over TCP/IP enabled, if any.
$wmi = Get-WmiObject -computerName $myComputer -query "select * from win32_networkadapterconfiguration where IPEnabled='true'";
$interface = $null;
$wmi | % { if ($_.TcpIpNetBiosOptions) { $interface = $_; break; }}
[bool]$interface;