大网数据广告活动
Windows排障命令

nfsshare

· 52CE 我爱测

Reference article for the nfsshare command, which controls Network File System (NFS) shares.

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.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 10/16/2017
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。