The rmshare utility removes a share.
The share can be specified either with the path name of the directory
being shared (with the
If a remote machine is not specified with the
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.
-foption overrides the -ioption. -f
includes hidden shares among those to be removed. Normally hidden shares are not removed.
prompts you before removing a specified share.
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.
specifies the path name of the shared directory whose share is to be removed.
(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.
Specifies the remote machine on which the share to be removed resides.
When running this utility on a 8.1/2012R2/10/2016/2019/11/2022 system and using the
-Sto 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.
Possible exit status values are:
Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.
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
PTC MKS Toolkit 10.4 Documentation Build 39.