The
NET SHARE is used to manage shared resources so that network users can use resources on one server. When you use this command without an option, it lists all the resources that are being shared on that computer. For each resource, Windows reports its device name or pathname, along with the descriptive comments associated with it.
Its command syntax is as follows:
NET SHARE sharename Sharename=drive:path [/users:number/unlimited] [/remark: "Text"] [/cache:manual A Utomatic No] sharename [/users:number/unlimited] [/remark: "Text"] [/cache:manual Documents Programs None] {share The name DeviceName Drive:path}/delete
ShareName refers to the network name of the shared resource. The input NET SHARE and a share name only show information about that share. The
Drive:path specifies the absolute path of the directory that will be shared. The
/users:number sets the maximum number of users that can access a shared resource at the same time. The
/unlimited specifies the number of unrestricted users who can access shared resources at the same time.
/remark: "Text" adds a descriptive comment about the resource, and the text should be enclosed in quotation marks.
DeviceName refers to one or more printers shared by the shared name (LPT1: to LPT9:). The
/delete terminates the sharing of resources.
/cache:automatic enable offline client caching and automatic reintegration
/cache:manual enable offline client caching and manual reintegration
/cache:no tell customers that offline caching is not appropriate
when you create a share on a server These shares will be saved. When the server service is stopped, all shares are disconnected, but they are automatically reconnected the next time the server service is started or the computer restarts. When browsing the local computer from a remote computer, the shared resource name ending with the character $ is not displayed.
to use the share name Datashare share the computer's C:data directory and include comments:
net share datashare=c:data/remark: "For DepartmeNT 123. "
to stop the Datashare folder share created in the previous example:
net share datashare/delete