Net Share Command Overview

Jun 14, 2025

Overview

This lecture explains the usage of the net share command in Windows, covering its syntax, parameters, application, and practical examples for managing shared network resources.

Purpose and Usage

  • net share manages shared resources on the local computer.
  • Used without parameters, it displays all currently shared resources.
  • Each shared resource displays its name, path or device, and an optional comment.

Syntax and Parameters

  • Basic usage: net share <ShareName> shows info for a specific share.
  • Create or modify a share: net share <ShareName>=<drive>:<DirectoryPath> [options]
  • Remove a share: net share <ShareName> /delete
  • Key options include:
    • /grant:<user>,{read|change|full} sets user permissions.
    • /users:<number> limits simultaneous user access.
    • /unlimited allows unlimited users.
    • /remark:"text" adds a description.
    • /cache:{manual|documents|programs|BranchCache|none} sets caching behavior.

Behavior and Remarks

  • Use quotes around directory paths with spaces (e.g., "C:\My Folder").
  • Shares ending with $ (e.g., ADMIN$) are hidden from remote browsing.
  • Shares persist across server restarts; stopping the Server service disconnects shares, but they reconnect on reboot.

Examples

  • List all shares: net share
  • Share C:\Data as DataShare with a description:
    net share DataShare=c:\Data /remark:"For department 123."
  • Stop sharing DataShare:
    net share DataShare /delete
  • Share C:\Art List as list:
    net share list="c:\Art List"

Key Terms & Definitions

  • Share — A folder or device made accessible over the network.
  • Share Name — The network-visible name of a shared resource.
  • /grant — Option for setting user access permissions.
  • /remark — Text describing the share.
  • /delete — Ends sharing for a resource.
  • /cache — Determines how files are cached from the share.

Action Items / Next Steps

  • Practice using net share commands to list, create, and remove shares on a test Windows machine.
  • Review related topics: Shared Folder Concepts, Special Shared Resources, and Windows Server Services.