0

on a laptop (win7) I'm connected through VPN (IPsec, with the Sophos VPN Client) to a network with a domain server (Server1012 and mixed clients Win7 and Win10 all connected through the same LAN-switch, no VLAN). The laptop is not part of the domain and I logged on as a local user. I would like to use the net view command for the domain which should be net view /domain:DOMAINNAME.

Let's say the domain name is XYZ123 (XYZ123.local) how should I use the command? For other command line applications/commands I use XYZ123.local e.g. ping PC1.XYZ123.local which works fine, but the net view command doesn't work:

net view /domain:XYZ123.local gives me the error "87: wrong parameter"

net view /domain:XYZ123 gives me the error "6118: server list is not available"

if possible at all in this scenario, which should I use? did I miss anything?

Edit: Right now my solution is to log on to a remote machine directly on the domain network and then use the command locally. Is there a way to do that with less afford or a way for an automation?

Albin
  • 101
  • 2

1 Answers1

2

Don't expect it to work through a VPN. (In fact, don't expect to it work in the future at all.)

net view does not use DNS, nor mDNS, nor LLMNR, nor Active Directory. Its only purpose is to get a list of computers visible via NetBIOS "Browsing". (As far as I know, it does not support WS-Discovery either.) Valid parameters for /domain: would be either NetBIOS workgroup names, or NT4 domain names.

If WINS is not in use (which it almost never is), then the list of computers is retrieved from the "master browser", which is found via NetBIOS broadcasts. In SMBv1/NetBIOS workgroups the master browser is elected; in Windows NT4 domains, the primary domain controller would have been the "domain master browser" and all domain clients would have been in a shared broadcast domain with the PDC (as far as I know).

But in modern networks, chances are you'll be several routers away from the domain controller and cannot find it via UDP broadcast. (Active Directory no longer uses NetBIOS for discovery – it uses DNS.) This is even more likely when connecting over a VPN. So there isn't any computer you could ask for the browse results. (Yes, there could still be WINS, but… who ever runs WINS on todays networks?)

Additionally, the client, the master browser, and all computers to-be-listed must speak some variant of SMBv1. If you have a Win10 or Win2012+ system in which SMBv1 support is disabled, all of NetBIOS is disabled as well – "browsing" doesn't happen.

user1686
  • 10,162
  • 1
  • 26
  • 42
  • Thanks, so as far as I understand the command would work if I'm on the same physical LAN but on a different IP subnet (hope I'm using the right term) with a router managing the traffic between the two subnets? – Albin Sep 26 '18 at 17:41
  • Well... If you mean two different IP subnets on the same _broadcast domain_ (both on the same switch, same vlan), then it might work, because the router can be bypassed. **But** that's not the way subnets are normally used: normally each subnet corresponds to a separate broadcast domain (either separated via VLANs, or via physical cabling), and the _only_ way between them is a router – which won't forward broadcasts to the other subnet. – user1686 Sep 26 '18 at 17:47
  • Yeah, I meant the same broadcast domain. It's not configured this way, it was just an example to make sure I understand. Right now my solution is to log on to a remote machine directly on the domain network and then use the command locally. Do you have any idea if there is an easier solution or a way for automation? – Albin Sep 26 '18 at 17:59
  • Solution for what problem, precisely? Post a question about what information you're trying to collect, not about what tools you're trying to use. – user1686 Sep 26 '18 at 18:17
  • Oh, sorry, I thought that was clear. I'm trying to get a list of all the "hostnames" of all devices currently active on the network. Basically it should be at least the information I get by using net view within the broadcast domain. – Albin Sep 26 '18 at 18:21