$message = "Do you want to disable NetBIOS over IPv4?"
$yes = New-Object System.Management.Automation.Host.ChoiceDescription "&Yes", `
  "Disables NetBIOS over IPv4."
$no = New-Object System.Management.Automation.Host.ChoiceDescription "&No", `
  "Does nothing."
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
$result = $host.ui.PromptForChoice($title, $message, $options, 1)
switch ($result) {
  0 {
    $adapters = gwmi Win32_NetworkAdapterConfiguration
    foreach ($a in $adapters){
      $a.SetTcpipNetbios(2)
    }
  }
}
