' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
iparg = WScript.Arguments(0)
Set shell = CreateObject("WScript.Shell")
Set wmi = GetObject("winmgmts:")
Set nics = wmi.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True")
For Each nic In nics
   If Not IsNull(nic.IPAddress) Then
      For Each ip In nic.IPAddress
         If InStr(ip,iparg) > 0 Then
            shell.Run "cmd /c noget " & ip
         Else
            shell.Run "cmd /c nogetandet " & ip
         End If
      Next
   End If
Next
