Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can someone please explain the difference between these commands.

net view
net view /all
net view /domain
net view /all /domain
share|improve this question

migrated from security.stackexchange.com Nov 25 '11 at 9:13

This question came from our site for Information security professionals.

1 Answer 1

up vote 3 down vote accepted

From net help view:

C:\Users\shufler>net help view
The syntax of this command is:

NET VIEW
[\\computername [/CACHE] | [/ALL] | /DOMAIN[:domainname]]

NET VIEW displays a list of resources being shared on a computer. When used
without options, it displays a list of computers in the current domain or
network.

\\computername             Is a computer whose shared resources you want
                           to view.
/DOMAIN:domainname         Specifies the domain for which you want to
                           view the available computers. If domainname is
                           omitted, displays all domains in the local area
                           network.
/CACHE                     Displays the offline client caching settings for
                           the resources on the specified computer
/ALL                             Displays all the shares including the $ shares

So let's look at each.

net view returns the computers in the current domain or network. This list will only show computers that have file and printer sharing enabled.
net view /all shows all shares available, including administrative shares like C$ and admin$
net view /domain:contoso.com will list all of the sharing computers in the contoso.com domain
net view /all /domain shows all shares (regular and administrative) in the domain

I'm not currently connected to a domain so unfortunately I can't provide you with examples.

share|improve this answer
    
Wow didn't even notice the help command. I kept doing "net view ?" wasn't as detailed. –  Mike Nov 25 '11 at 8:44
    
@Mike If you tried net /? you may have noticed the help option. Follow the rabbit hole from there. –  Iszi Nov 25 '11 at 9:14
    
+1 great answer shufler –  HaydnWVN Nov 25 '11 at 11:41
    
To be fair, NET is one of maybe a handful of Microsoft console applications that doesn't follow the same input model as other commands. Yes, NET /? shows HELP as an option, but you normally wouldn't expect an additional help system beyond /? for most cmd utilites. –  shufler Nov 25 '11 at 12:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.