GCIH · Question #632
Which of the following 'net' commands will show the file shares available on a Windows system?
The correct answer is C. net view \\hostname. The 'net view \\hostname' command enumerates shared resources available on a remote Windows system.
Question
Which of the following 'net' commands will show the file shares available on a Windows system?
Options
- Anet use \hostname
- Bnet share \hostname_
- Cnet view \hostname
- Dnet show \hostname
How the community answered
(20 responses)- C95% (19)
- D5% (1)
Why each option
The 'net view \\hostname' command enumerates shared resources available on a remote Windows system.
'net use \\hostname' is used to connect to or disconnect from a shared resource, not to list what shares are available on a host.
'net share' manages and displays shares on the local machine only - it does not accept a remote hostname argument to enumerate shares on another system.
The 'net view \\hostname' command queries the specified remote computer and displays a list of its shared resources, including file shares and print shares. This makes it the correct tool for enumerating available shares on a target host during reconnaissance or administrative tasks.
'net show' is not a valid Windows built-in net subcommand and will return an error if executed.
Concept tested: Windows net commands for share enumeration
Source: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh875576(v=ws.11)
Topics
Community Discussion
No community discussion yet for this question.