RMTSHARE.exe (NT 4 Resource kit)

Manage File and Printer shares, local or on a remote server.
Although missing from recent Resource kits, the old version works also under Windows XP/2003 and possibly newer versions.

  Display all shares
      RMTSHARE \\server

  Display details of a specific share
      RMTSHARE \\server\sharename

  Share a Folder
      RMTSHARE \\server\sharename=drive:path [options]

  Share a Printer
      RMTSHARE \\server\sharename=printername /PRINTER [options]

  Edit an existing SHARE
      RMTSHARE \\server\sharename [options]

  Delete a SHARE
      RMTSHARE \\server\sharename /DELETE

      /GRANT user:perm
      /REMOVE user

Notes: Either specify /Users to restrict the number of connections that can be made OR specify /UNLIMITED
You can include several /GRANTs in a single command line.
Enclose paths that include spaces like this
\\server\"long share name"="c:\long file name"

PowerShell alternative

An alternative way to list remote shares with PowerShell:

$server = 'SERVER64'
$shares = Get-CIMinstance -class Win32_Share -computername $server -filter "Type=0"
$shares | foreach {

    "Share Name   : $name
     Source Folder: $path 
     Description  : $Description
     Caption : $Caption"

“How to be green? consume less, share more, enjoy life” ~ Penny Kemp

Related commands

CACLS - Apply File permissions.
NET USE - Connect to a file share.
REMOTE - Run a command on a remote computer (Resource Kit).
RUNDLL32 - Run a DLL command (add/remove print connections).
SHARE - List or edit a file share or print share (on any computer).
Equivalent PowerShell: Get-CIMInstance win32_share.
Equivalent bash command (Linux): mount - Mount a file system.

Copyright © 1999-2024 SS64.com
Some rights reserved