CMD Simulator
Networkingnet share

NET SHARE Command Guide - Manage Shared Resources in Windows

Learn how to use the net share command to display, create, and delete shared folders in Windows. Includes syntax, permissions, troubleshooting, and enterprise examples.

Rojan Acharya··Updated Mar 19, 2026
Share

The net share command is a Windows Command Prompt utility that displays, creates, and deletes shared resources (folders and printers) on a computer. Use net share with no arguments to list all shares, or net share ShareName=Path to create a new share—essential for IT administrators managing file servers, configuring network access, and troubleshooting shared resource connectivity in enterprise environments.

Whether you're setting up a file share for a department, auditing existing shares on a server, or removing an obsolete share, net share provides command-line control over Windows file sharing. System administrators rely on this command for scripted share creation, quick audits of shared resources, and managing the administrative shares (C$, ADMIN$, IPC$) that Windows creates by default.

This comprehensive guide covers net share syntax, creating and deleting shares, permission options, practical examples for common scenarios, troubleshooting tips, related commands, and frequently asked questions. By the end, you'll confidently manage shared resources from the command line.

What Is the NET SHARE Command?

The net share command is part of the NET utility that manages network resources in Windows. It displays information about shared folders and printers, creates new shares, and deletes existing shares. NET SHARE works with the Server service; the computer must have file and printer sharing enabled.

NET SHARE is available in all Windows versions that support networking, including Windows 10, Windows 11, and Windows Server 2022. Creating and deleting shares requires administrator privileges. The command works in Command Prompt (CMD) and PowerShell. Windows creates default administrative shares (C$, ADMIN$, IPC$) automatically for management; these can be hidden but are present on domain-joined and workgroup systems.

NET SHARE Command Syntax

net share [ShareName]
net share ShareName=Drive:Path [/grant:user,permission] [/users:number] [/remark:"text"]
net share ShareName [/grant:user,permission] [/users:number] [/remark:"text"]
net share {ShareName | *} /delete

Parameters and Switches

ParameterDescription
ShareNameName of the share (use * with /delete for all)
Drive:PathLocal path to share
/grant:user,permissionGrant permission: Read, Change, or Full
/users:numberMaximum number of simultaneous users
/remark:"text"Description for the share
/deleteDelete the share
/?Display help information

Parameters in Detail

ShareName (Display)

When used alone, net share ShareName displays information about that share. Use net share with no arguments to list all shares on the computer.

Example: net share lists C$, ADMIN$, IPC$, and any user-created shares. Shows share name, path, and remark.

ShareName=Drive:Path (Create)

Creates a new share. ShareName is the name users will use to access the share (e.g., \computer\ShareName). Drive:Path is the local folder to share.

Example: net share Data=C:\SharedData creates a share named Data pointing to C:\SharedData. Users access it as \computername\Data.

/grant:user,permission

Sets share-level permissions when creating a share. Permissions: Read (read-only), Change (read and modify), Full (full control). Use icacls for NTFS permissions after share creation.

Example: net share Reports=C:\Reports /grant:Everyone,Read creates Reports share with read-only access for Everyone.

/delete

Removes a share. The shared folder remains on disk; only the share (network access point) is removed.

Example: net share Data /delete removes the Data share. C:\SharedData still exists locally.

Examples

Example 1: List All Shares

Scenario: You need to see all shared resources on the computer.

net share

Expected Output: Table showing Share name, Resource (path), and Remark for each share. Includes C$, ADMIN$, IPC$, and user shares.

Example 2: Create a Basic Share

Scenario: Create a share for the Finance department.

net share Finance=C:\Finance

Expected Output: "Finance was shared successfully." Users can access \computername\Finance.

Example 3: Create Share with Permission

Scenario: Create a share with read-only access for a specific group.

net share ReadOnly=C:\Public /grant:Domain Users,Read

Expected Output: Share created with Read permission for Domain Users. Users can view but not modify files.

Example 4: Create Share with User Limit

Scenario: Limit concurrent connections to 10 users.

net share Limited=C:\Limited /users:10

Expected Output: Share created. Only 10 users can connect simultaneously. Prevents overload on smaller servers.

Example 5: Create Share with Remark

Scenario: Add a description for the share.

net share Projects=C:\Projects /remark:"Project files - read/write"

Expected Output: Share created with remark visible in net share listing. Helps document share purpose.

Example 6: Delete a Share

Scenario: Remove an obsolete share.

net share OldShare /delete

Expected Output: "OldShare was deleted successfully." The folder remains; only network access is removed.

Example 7: Delete All User-Created Shares

Scenario: Remove all shares (use with caution).

net share * /delete

Expected Output: All shares deleted. Administrative shares (C$, ADMIN$) may recreate on reboot. Use with extreme caution.

Example 8: Modify Existing Share

Scenario: Change remark or user limit on existing share.

net share Finance /remark:"Updated 2026" /users:20

Expected Output: Share properties updated. Remark and user limit changed.

Common Use Cases

  1. List shares for audit – Run net share to inventory all shared resources on a server for compliance or documentation.

  2. Create department share – Use net share DeptName=C:\Path to quickly create a share for a team or project.

  3. Restrict share access – Use /grant: to set Read permission for read-only shares, preventing accidental modification.

  4. Limit concurrent users – Use /users:number on smaller servers to prevent too many simultaneous connections.

  5. Script share creation – Include net share in deployment scripts to create shares during server setup.

  6. Remove obsolete shares – Use net share ShareName /delete when decommissioning shares or migrating to new paths.

  7. Document share purpose – Use /remark: to add descriptions visible in net share output; aids troubleshooting.

  8. Audit administrative shares – Verify C$ and ADMIN$ exist on managed servers; their absence may indicate configuration issues.

  9. Create temporary shares – Use net share for quick, temporary access; delete with /delete when done.

  10. Troubleshoot "cannot access share" – Run net share to verify share exists and path is correct.

  11. Prepare for migration – Document shares with net share before migrating to new file server.

  12. Verify share after creation – Run net share ShareName to confirm share was created and properties are correct.

Tips and Best Practices

  1. Use descriptive share names – Choose names that indicate purpose (e.g., Finance, Projects) rather than generic names.

  2. Combine with NTFS permissions – Share permissions apply at network level; use icacls for folder-level NTFS permissions. Combine both for defense in depth.

  3. Document share purpose – Use /remark for every share. Future administrators will thank you.

  4. Avoid spaces in share names – Use underscores or CamelCase. Spaces can cause issues in scripts and UNC paths.

  5. Run as Administrator – Creating and deleting shares requires elevation. Use "Run as administrator" for CMD.

  6. Verify path exists – Ensure the path exists before creating share. net share will fail if path is invalid.

  7. Use /grant for least privilege – Grant Read when possible; use Change or Full only when needed.

  8. Test access after creation – Use net view \\computername or dir \\computername\share to verify share is accessible.

  9. Remove shares before folder deletion – Delete share with net share /delete before removing the folder to avoid orphaned share references.

  10. Audit shares regularly – Run net share periodically to identify unauthorized or obsolete shares.

Troubleshooting Common Issues

"Access is denied" When Creating Share

Problem: net share fails with access denied.

Cause: Creating shares requires administrator privileges. Standard users cannot create shares.

Solution: Right-click Command Prompt and select "Run as administrator." Ensure your account has local admin rights.

Prevention: Document that share management requires elevation. Use runas or deployment tools for non-admin scenarios.

"The shared resource does not exist"

Problem: net share reports share doesn't exist when trying to delete or modify.

Cause: Share name may be misspelled; share may have been deleted; Server service may be stopped.

Solution: Run net share to list current shares. Verify exact share name (case-insensitive but spelling matters). Check Server service: sc query LanmanServer.

Prevention: Use net share to verify share name before delete or modify operations.

"The system cannot find the path specified"

Problem: net share fails when creating share; path not found.

Cause: Path doesn't exist; typo in path; path on different drive; use of invalid characters.

Solution: Verify path with dir C:\Path. Use absolute paths. Ensure drive letter is correct. Create folder first if missing.

Prevention: Use if exist in scripts to verify path before net share. Document standard paths.

Share Created But Users Cannot Access

Problem: Share appears in net share but users get "access denied" when connecting.

Cause: NTFS permissions may be restrictive; Share permissions may limit access; firewall may block SMB.

Solution: Check NTFS permissions with icacls. Verify share permissions. Ensure Windows Firewall allows File and Printer Sharing (SMB). Check user account for proper group membership.

Prevention: Set both share and NTFS permissions during creation. Use /grant for share-level; use icacls for NTFS.

Administrative Shares (C$, ADMIN$) Missing

Problem: C$ or ADMIN$ not listed in net share.

Cause: AutoShareServer or AutoShareWks registry may be disabled; often done for "security" but breaks management tools.

Solution: Check registry: HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\AutoShareServer (and AutoShareWks). Set to 1 to enable. Restart Server service or reboot.

Prevention: Avoid disabling administrative shares unless required by policy. Many management tools depend on them.

Related Commands

net view – List Network Resources

net view displays shared resources on a computer. Use to see shares from another machine's perspective. Complements net share.

When to use: net view \\computername to list shares on a remote computer. See net view command guide.

icacls – NTFS Permissions

icacls manages NTFS permissions (read, write, execute, full control). Share permissions (net share /grant) apply at network level; icacls applies at file system level. Use both for security.

When to use: After creating share with net share, use icacls to set folder-level permissions.

net use – Map Network Drives

net use maps a drive letter to a shared folder. Use after creating share with net share to connect from client.

When to use: net use Z: \\server\share to map drive. Users connect to shares created with net share.

smb – Server Message Block

SMB is the protocol behind Windows file sharing. net share manages SMB shares. Ensure SMB is enabled (File and Printer Sharing) for shares to work.

When to use: Troubleshoot SMB connectivity when shares don't work. Check firewall and SMB settings.

Frequently Asked Questions

What does the net share command do?

NET SHARE displays, creates, and deletes shared folders (and printers) on a Windows computer. Use net share to list shares, net share Name=Path to create, and net share Name /delete to remove. Essential for managing network file sharing.

How do I list all shared folders?

Run net share with no arguments. Output shows share name, local path (resource), and remark for each share. Includes default administrative shares (C$, ADMIN$, IPC$).

How do I create a shared folder?

Use net share ShareName=Drive:Path. Example: net share Data=C:\SharedData creates a share named Data. Users access as \computername\Data. Requires administrator privileges.

How do I delete a shared folder?

Use net share ShareName /delete. Example: net share Data /delete removes the Data share. The folder remains on disk; only network access is removed.

What are C$ and ADMIN$?

C$ and ADMIN$ are default administrative shares. C$ shares the root of the C: drive; ADMIN$ shares the Windows folder. They're hidden (no $ in browse) and require administrator credentials. Used for remote administration.

What is the difference between share permissions and NTFS permissions?

Share permissions (set with /grant) apply when accessing over network. NTFS permissions (set with icacls) apply at file system level. Both apply when accessing over network; most restrictive wins. Use both for security.

Can I set permissions when creating a share?

Yes. Use /grant:user,permission where permission is Read, Change, or Full. Example: net share Data=C:\Data /grant:Everyone,Read creates read-only share.

Why can't users access my share?

Check: (1) Share exists (net share), (2) NTFS permissions allow access (icacls), (3) Share permissions allow access (/grant), (4) Firewall allows SMB, (5) User has correct network path (\server\share).

How do I limit the number of users on a share?

Use /users:number when creating: net share Data=C:\Data /users:10. Limits to 10 simultaneous connections. Useful for licensing or performance.

Can net share create shares on a remote computer?

No. NET SHARE manages shares on the local computer only. To manage remote shares, use PowerShell (New-SmbShare), WMI, or run net share on the remote computer via PsExec or similar.

Quick Reference Card

CommandPurposeExample Use Case
net shareList all sharesAudit shared resources
net share Data=C:\DataCreate shareShare folder
net share Data=C:\Data /grant:Users,ReadCreate share with permissionRead-only share
net share Data /deleteDelete shareRemove share
net share Data /remark:"Description"Add/change remarkDocument share
net share Data /users:10Set user limitLimit connections

Try the NET SHARE Command in Our Simulator

Practice the net share command safely in our Windows Command Simulator. Explore net view for listing shares on remote computers, the Commands Reference for all Windows CMD utilities, and gpupdate for Group Policy management.

Summary

The net share command manages shared resources in Windows. Use net share to list shares, net share Name=Path to create, and net share Name /delete to remove. Combine /grant for permissions, /users for connection limits, and /remark for documentation. Run as Administrator for create/delete operations. Remember: share permissions apply at network level; use icacls for NTFS permissions. Master net share for efficient file server management and network resource administration.