Controls Network File System (NFS) shares. Used without parameters, this command displays all Network File System (NFS) shares exported by Server for NFS.
Syntax
nfsshare <sharename>=<drive:path> [-o <option=value>...]
nfsshare {<sharename> | <drive>:<path> | * } /delete
Parameters
| Parameter | Description |
|---|---|
| -o anon=`{yes | no}` |
-o rw=[<host>[:<host>]...] |
Provides read-write access to the shared directory by the hosts or client groups specified by host. You must separate host and group names with a colon (:). If host isn't specified, all hosts and client groups (except those specified with the ro option) get read-write access. If neither the ro nor the rw option is set, all clients have read-write access to the shared directory. |
-o ro=[<host>[:<host>]...] |
Provides read-only access to the shared directory by the hosts or client groups specified by host. You must separate host and group names with a colon (:). If host isn't specified, all clients (except those specified with the rw option) get read-only access. If the ro option is set for one or more clients, but the rw option isn't set, only the clients specified with the ro option have access to the shared directory. |
| -o encoding=`{euc-jp | euc-tw |
-o anongid=<gid> |
Specifies that anonymous (unmapped) users access the share directory using gid as their group identifier (GID). The default is -2. The anonymous GID is used when reporting the owner of a file owned by an unmapped user, even if anonymous access is disabled. |
-o anonuid=<uid> |
Specifies that anonymous (unmapped) users access the share directory using uid as their user identifier (UID). The default is -2. The anonymous UID is used when reporting the owner of a file owned by an unmapped user, even if anonymous access is disabled. |
-o root=[<host>[:<host>]...] |
Provides root access to the shared directory by the hosts or client groups specified by host. You must separate host and group names with a colon (:). If host isn't specified, all clients get root access. If the root option isn't set, no clients have root access to the shared directory. |
| /delete | If sharename or <drive>:<path> is specified, this parameter deletes the specified share. If a wildcard (*) is specified, this parameter deletes all NFS shares. |
| /? | Displays help at the command prompt. |
Remarks
-
If sharename as the only parameter, this command lists the properties of the NFS share identified by sharename.
-
If sharename and
<drive>:<path>are used, this command exports the folder identified by<drive>:<path>as sharename. If you use the /delete option, the specified folder stops being available to NFS clients.
Related links
Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
