$numOfArgs = $args.Length
if ($numOfArgs -gt 0)
{
	$tap=$args[0]
	foreach ($s in  $(netsh interface ip show config name="$tap" | findstr "IP Address")) {
		$ip = $s.Split(":")[1].Trim()
		netsh interface ipv4 delete address "$tap" addr=$ip gateway=all
        $interfaceIndex = $(Get-WMIObject Win32_networkadapter | Where ServiceName -eq "tap0901" | Select -ExpandProperty InterfaceIndex)
		route delete $ip if $interfaceIndex
	}
}