net viewNET VIEW Command Guide - Display Network Resources in Windows
Learn how to use the net view command to list shared resources, domains, and computers in Windows. Includes syntax, troubleshooting, and enterprise examples.
The net view command is a Windows Command Prompt utility that displays a list of domains, computers, or shared resources (shares) on a specified computer. Use net view to list shares on the local computer, net view \\computername to list shares on a remote computer, or net view /domain to list domains—essential for IT administrators browsing network resources, troubleshooting share connectivity, and discovering available file servers.
Whether you're finding shared folders on a file server, listing computers in a domain, or verifying that a share is visible on the network, net view provides quick command-line discovery of network resources. System administrators rely on this command for quick audits, troubleshooting "cannot find network path" errors, and scripting resource discovery.
This comprehensive guide covers net view syntax, listing local and remote shares, domain and computer discovery, practical examples for common scenarios, troubleshooting tips, related commands, and frequently asked questions. By the end, you'll confidently use net view to discover and verify network resources.
What Is the NET VIEW Command?
The net view command is part of the NET utility that displays network resource information. It queries the network to list shared folders and printers on a computer, or to list computers in a domain or workgroup. NET VIEW uses the Computer Browser service and SMB protocol to gather information.
NET VIEW is available in all Windows versions that support networking, including Windows 10, Windows 11, and Windows Server 2022. Listing shares on the local computer requires no special privileges; querying remote computers may require network access and appropriate permissions. The command works in Command Prompt (CMD) and PowerShell.
NET VIEW Command Syntax
net view [\\computername] [/cache]
net view [/domain[:domainname]]
net view \\computername /delete
Parameters and Switches
| Parameter | Description |
|---|---|
\\computername | Specifies computer whose shares to list |
/cache | Display offline resource caching settings (with \computername) |
/domain:domainname | List computers in specified domain |
/domain | List all domains (when no domainname) |
/delete | Remove computer from local cache (rarely used) |
/? | Display help information |
Parameters in Detail
No Arguments (Local Shares)
When used with no arguments, net view lists shared resources on the local computer. Equivalent to net view \\computername where computername is the local machine.
Example: net view shows C$, ADMIN$, IPC$, and any user-created shares on the current computer.
\computername (Remote Shares)
Specifies a remote computer whose shared resources you want to list. Use UNC format: \computername or \IPaddress.
Example: net view \\FILESERVER01 lists all shares on FILESERVER01. Use to discover available shares before connecting.
/domain (List Domains)
Lists all domains visible to the computer. In workgroup environments, may show workgroup name. In domain environments, shows trusted domains.
Example: net view /domain displays domain names. Use to discover domain structure.
/domain:domainname (List Computers in Domain)
Lists computers in the specified domain. Useful for discovering workstations and servers in a domain.
Example: net view /domain:CONTOSO lists all computers in the CONTOSO domain. May take time on large domains.
Examples
Example 1: List Shares on Local Computer
Scenario: You want to see what's shared on your computer.
net view
Expected Output: "Shared resources at \COMPUTERNAME" followed by table of Share name, Type, and Comment. Shows local shares.
Example 2: List Shares on Remote Computer
Scenario: Find available shares on a file server.
net view \\FILESERVER01
Expected Output: "Shared resources at \FILESERVER01" with table of shares. Use output to identify share names for net use or Explorer.
Example 3: List Shares by IP Address
Scenario: Query computer when hostname resolution fails.
net view \\192.168.1.100
Expected Output: Shares on 192.168.1.100. Useful when DNS or NetBIOS name resolution has issues.
Example 4: List All Domains
Scenario: Discover domain structure.
net view /domain
Expected Output: List of domain names. In single-domain environment, shows one domain. In multi-domain forest, shows multiple.
Example 5: List Computers in Domain
Scenario: Get list of computers in your domain.
net view /domain:CONTOSO
Expected Output: List of computer names in CONTOSO domain. Format: "\COMPUTER1", "\COMPUTER2", etc. May be slow on large domains.
Example 6: List Shares with Cache Info
Scenario: Check offline caching settings for shares on a server.
net view \\FILESERVER01 /cache
Expected Output: Shares with caching mode (e.g., Manual, Documents, Programs). Useful for offline file configuration.
Example 7: Verify Share Exists Before Script
Scenario: In a script, verify share exists before mapping.
net view \\FILESERVER01 | find "DataShare"
Expected Output: If DataShare exists, find returns the line. Use in batch: if errorlevel 1 echo Share not found.
Example 8: Discover Shares on Multiple Servers
Scenario: Quick audit of shares on key servers.
net view \\SERVER01
net view \\SERVER02
net view \\SERVER03
Expected Output: Share lists for each server. Redirect to file for documentation: net view \\SERVER01 >> shares.txt.
Common Use Cases
-
Discover shares on file server – Run
net view \\fileserverto see all available shares before connecting or documenting. -
Troubleshoot "network path not found" – Use net view to verify share exists and is visible. If net view fails, problem is connectivity or permissions.
-
List domain computers – Use
net view /domain:domainnameto get computer list for scripting or documentation. -
Verify share after creation – After creating share with net share, run net view to confirm it's visible on network.
-
Audit shared resources – Run net view on key servers periodically to document shares for compliance.
-
Script resource discovery – Use net view in scripts to find shares before net use or copy operations.
-
Check offline caching – Use net view /cache to see caching settings for shares; affects offline file behavior.
-
Discover domain structure – Use net view /domain to see available domains in multi-domain environment.
-
Pre-migration inventory – Document shares with net view before migrating to new file server.
-
Verify SMB connectivity – If net view works, SMB is functioning. Use as quick connectivity test.
-
Find share names for mapping – Get exact share names from net view before creating net use or Explorer mappings.
-
Troubleshoot browse list – Net view uses Computer Browser; if it fails, check Browser service and SMB.
Tips and Best Practices
-
Use for quick discovery – Net view is faster than browsing in Explorer for listing shares. Use when you need a quick list.
-
Combine with net use – Use net view to find share names, then net use to map. Standard workflow for drive mapping.
-
Use IP when name resolution fails – If
net view \\hostnamefails, trynet view \\IPaddressto isolate DNS/NetBIOS issues. -
Redirect output for documentation –
net view \\server > shares.txtcaptures share list for documentation. -
Check firewall – Net view requires SMB (ports 445, 139). Ensure Windows Firewall allows File and Printer Sharing.
-
Domain list can be slow –
net view /domain:nameon large domains may take minutes. Be patient. -
Run from correct context – Net view uses current user's credentials. For remote query, ensure you have access.
-
Verify before scripting – Test net view manually before using in scripts. Output format may vary by Windows version.
-
Use find to filter – Pipe to find for specific share:
net view \\server | find "ShareName". -
Document in runbooks – Include net view in troubleshooting runbooks for "cannot access share" issues.
Troubleshooting Common Issues
"System error 53 - The network path was not found"
Problem: net view \computername fails with error 53.
Cause: Computer unreachable; name resolution failed; SMB blocked by firewall; computer off; wrong computer name.
Solution: Ping the computer to verify reachability. Try IP address: net view \\192.168.1.100. Check firewall allows SMB. Verify computer name spelling. Ensure Computer Browser and Server services are running on target.
Prevention: Document correct computer names. Use IP in scripts when hostname resolution is unreliable.
"System error 5 - Access is denied"
Problem: net view \computername fails with access denied.
Cause: User lacks permission to browse shares; Guest account disabled; restrictive share permissions; UAC or credential issues.
Solution: Ensure user has at least Read permission on shares or is in appropriate group. On target, check "Network access: Let Everyone permissions apply to anonymous users" (security policy). Try with domain admin account to isolate permission issue.
Prevention: Grant appropriate browse permissions. Document required groups for share discovery.
"There are no entries in the list"
Problem: net view succeeds but shows no shares.
Cause: No shares exist on computer; Server service stopped; shares hidden; firewall blocking.
Solution: On target computer, run net share to verify shares exist. Check Server service: sc query LanmanServer. Ensure SMB is not blocked. Administrative shares (C$, ADMIN$) may be disabled via registry.
Prevention: Verify Server service runs on file servers. Avoid disabling administrative shares unless required.
Net View Hangs or Times Out
Problem: net view doesn't return; appears to hang.
Cause: Large domain (with /domain); slow network; WINS/DNS issues; target computer not responding.
Solution: For /domain, wait—large domains take time. For \computername, check network. Try ping. Reduce timeout (not directly possible with net view; use alternative tools if needed). Cancel with Ctrl+C.
Prevention: For domain listing, use during off-hours. Ensure reliable network connectivity.
"The specified server cannot perform the requested operation"
Problem: net view returns error about server operation.
Cause: Target may be a client OS with limited sharing; Server service not running; SMB version mismatch.
Solution: Verify target is a file server or has sharing enabled. Check Server service on target. Ensure both systems support compatible SMB version (SMBv1 disabled on newer Windows may affect older systems).
Prevention: Use net view against known file servers. Document SMB requirements for mixed environments.
Related Commands
net share – Manage Shares
net share creates and deletes shares. Use net view to discover shares; use net share to manage them on the local computer.
When to use: net view to list; net share to create/delete. See net share command guide.
net use – Map Drives
net use maps a drive letter to a share. Use net view to find share names, then net use to connect.
When to use: net view \\server to find shares; net use Z: \\server\share to map.
ping – Connectivity Test
ping verifies network connectivity. Use before net view when troubleshooting; if ping fails, net view will likely fail.
When to use: ping fileserver before net view \\fileserver to verify connectivity.
nslookup – DNS Resolution
nslookup tests DNS resolution. Use when net view \hostname fails; may indicate DNS issue.
When to use: nslookup fileserver to verify hostname resolves. Use IP in net view if DNS fails.
Frequently Asked Questions
What does the net view command do?
NET VIEW displays shared resources (shares) on a computer, or lists computers in a domain. Use net view for local shares, net view \\computername for remote shares, and net view /domain or net view /domain:name for domain/computer listing.
How do I list shared folders on a computer?
Run net view \\computername to list shares on a remote computer, or net view for the local computer. Output shows share name, type, and comment.
What is the difference between net view and net share?
NET VIEW displays shares (read-only discovery). NET SHARE manages shares (create, delete, modify). Use net view to see what's shared; use net share to change shares on the local computer.
Why does net view show "network path not found"?
Usually means the computer is unreachable: wrong name, computer off, firewall blocking SMB, or network issue. Try net view \\IPaddress to use IP instead of name. Ping the computer first.
Can net view list shares on a remote computer?
Yes. Use net view \\computername or net view \\IPaddress. Requires network connectivity and appropriate permissions. SMB must be allowed through firewall.
How do I list all computers in a domain?
Use net view /domain:domainname. Example: net view /domain:CONTOSO lists computers in CONTOSO domain. May take several minutes on large domains.
What does "Access is denied" mean with net view?
Your account doesn't have permission to browse shares on the target computer. May need to be in a group with access, or use an account with higher privileges. Check share and NTFS permissions on target.
Does net view require administrator rights?
No, for basic listing. Standard users can run net view to discover shares they have access to. Some shares may be hidden from non-admin users. Querying remote computers uses current user's credentials.
How do I use net view in a script?
Capture output: net view \\server > shares.txt. Or use find: net view \\server | find "ShareName" and check errorlevel. Parse output for automation.
What ports does net view use?
Net view uses SMB: TCP 445 (direct) or TCP 139 (NetBIOS session). Ensure these ports are open in firewall for net view to work across network segments.
Quick Reference Card
| Command | Purpose | Example Use Case |
|---|---|---|
net view | List local shares | See what's shared on this PC |
net view \\computername | List remote shares | Find shares on file server |
net view \\192.168.1.100 | List shares by IP | When hostname fails |
net view /domain | List domains | Discover domain structure |
net view /domain:CONTOSO | List domain computers | Get computer list |
net view \\server /cache | Show cache settings | Offline file config |
Try the NET VIEW Command in Our Simulator
Practice the net view command safely in our Windows Command Simulator. Explore net share for creating shares, the Commands Reference for all Windows CMD utilities, and gpresult for Group Policy verification.
Summary
The net view command displays network resources in Windows. Use net view to list local shares, net view \\computername to list remote shares, and net view /domain or /domain:name to discover domains and computers. Combine with net use to map drives after discovering shares. Use for troubleshooting "network path not found" and for quick audits of shared resources. Ensure SMB connectivity and firewall allow File and Printer Sharing. Master net view for efficient network resource discovery and troubleshooting.