You are on page 1of 2

5/30/2017 net share / net view / net session / net file / net use ­ Windows CMD ­ SS64.

com

(  SS64  ) CMD Syntax Search

NET.exe Share
The NET Share command is used to manage file/printer shares.

Syntax 
      NET SHARE sharename=drive:path [/GRANT:user,[READ | CHANGE | FULL]] 
             [/USERS:number | /UNLIMITED]] 
                [/REMARK:"text"] 
                   [/CACHE:Manual | Documents | Programs | BranchCache | None ] 

      NET SHARE sharename /DELETE 

      NET SHARE devicename /DELETE 

      NET SHARE drive:path /DELETE

To modify an existing share, the syntax above can be simplified to NET SHARE sharename ...  
with the one exception of the /GRANT option.

Examples

Display the details of the local share called work 
NET SHARE work 

Display the details of all local shares, including the folder/pathname that is being shared: 
NET SHARE 
To retrieve share details from a remote machine, use WMIC share

Create a new local file share 
NET SHARE work=C:\docs\work /REMARK:"work share" /CACHE:No 

Limit the number of users who can connect to a share 
NET SHARE work /USERS:15 

Remove any limit on the number of users who can connect to a share 
NET SHARE work /UNLIMITED 

Delete the share 
NET SHARE work /DELETE 

Delete all shares that apply to a given device 
NET SHARE devicename /DELETE 
In this case the devicename can be a printer (Lpt1) or a pathname (C:\Docs\) 

To create file shares, File and Printer sharing must be enabled on the (server) computer.

“Don’t worry about people stealing an idea. If itʹs original, you will have to ram it down their throats” ~ Howard Aiken 

Related: 

NET ­ Manage network resources. 
NET USE ­ Connect to a file share (Drive MAP). 
NET VIEW ­ View existing file/printer shares (local or remote). 
fsmgmt.msc ­ Network share Admin snap­in. 
Drmapsrv ­ Drive Share for use with Terminal Services (Win 2K Server Resource Kit only). 
WMIC share ­ View remote file/print shares. 
Q149427 ­ Change Password from the CMD prompt. 
Powershell: Get­WmiObject win32_share 

https://ss64.com/nt/net­share.html 1/2
5/30/2017 net share / net view / net session / net file / net use ­ Windows CMD ­ SS64.com

  Copyright © SS64.com 1999­2017
Some rights reserved

https://ss64.com/nt/net­share.html 2/2

You might also like