rmshare

remove a share 

Command


SYNOPSIS

rmshare [-fhirv] [-S hostname] [-n sharename | -p path]... [sharename]


DESCRIPTION

The rmshare utility removes a share. The share can be specified either with the path name of the directory being shared (with the -p option> or with the share name (with the -n option). Additionally, if an argument follows the option list, it is treated as a share name to be removed and processed as if it had been specified as an argument to the -n.

If a remote machine is not specified with the -S option or as part of the share name, rmshare assumes that the specified share resides on the local machine.

Options

-f 

removes hidden shares without first asking for confirmation. When you specify this option and a share does not exist, rmshare does not display and does not modify the exit status.

The -f option overrides the -i option.

-f 

includes hidden shares among those to be removed. Normally hidden shares are not removed.

-i 

prompts you before removing a specified share.

-n sharename 

specifies the name of the share to be removed. If sharename is a UNC name of the form //hostname/name, the effect is the same as specifying -S hostname -n name.

-p path 

specifies the path name of the shared directory whose share is to be removed.

-r 

(recursive) removes shares associated with subdirectories of the specified share. For example, if both c:/dir and c:/dir/subdir are shared, rmshare -p c:/dir normally only removes the share associated with c:/dir. However, rmshare -r -p c:/dir removes the shares associated with both directories.

-S hostname 

Specifies the remote machine on which the share to be removed resides.

Note:

When running this utility on a 7/2008R2/8/2012/10/2016 system and using the -S to specify a remote Windows 95/98/Me system, some operations may fail, due to limitations in the operating systems.

-v 

(verbose) displays additional information about the share being removed.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

An error occurred.

2 

A usage error occurred.


PORTABILITY

Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.


AVAILABILITY

PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
lsshare, mkshare


PTC MKS Toolkit 10.1 patch 1 Documentation Build 2.