Net Share Command In Windows Server 2008

This article explains Net share command in Windows Server 2008 operating system and syntax related with it.
  • 2117


Net share command is used to manages shared resources. if it is used without parameter it shows information about all of the resources that are shared on the local computer. Syntax used for Net share command is given below.


net share <ShareName>

net share <ShareName>=<drive> : <DirectoryPath> </grant : <user>,{read | change | full}[/users : <number> | /unlimited] [/remark : <text>] [/cache :{manual | documents | programs | branchcache| none}]

net share [/users : <number> | unlimited] [/remark : <text>] [/cache :{manual | document | programs | BranchCache | none}]

net share [<ShareName> | <DeviceName> | <Drive> :<Directorypath>} /delete

net share <ShareName> \\<ComputerName> /delete

Parameters For Net Share command

Parameter Description
<ShareName> Defines the network name of the shared resource.
<drive>:<DirectoryPath> Defines the absolute path of the directory to be shared.
/grant:<user>,{read | change |full} Creates the share with a security descriptor that gives the requested permissions to the specified user.
/users:<number> Defines the maximum number of users who can simultaneously access the shared resources.
/unlimited Defines an unlimited number of users can simultaneously access the shared resources.
/remark: <text> Adds a descriptive comment about the resource.
<DeviceName> Defines one or more printers shared by ShareName.
/delete Stops sharing the resource.
/cache: manual Enables manual client caching of programs and documents from this share.
/cache: documents Enables automatic caching of documents from this share.
/cache: programs Enables automatic caching of documents and programs from this share.
/cache: BranchCache Enables manual caching of documents with Branch Cache enabled from this share.
/cache: none Disables caching from this share.
net help <command> Shows help for the specified net command.

Ask Your Question

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.