System command

mapadmin command

The mapadmin command-line utility administers User Name Mapping on the local or remote computer running Microsoft Services for Network File System. This guide lists the documented syntax and parameters for mapadmin; check Microsoft Learn for version, role and execution-context requirements.

Availability: Microsoft Learn command reference spanning Windows client and Windows Server releases; some entries are legacy, role-specific, optional-feature or interactive subcommands.中文

Documented syntax

mapadmin [<computer>] [-u <user> [-p <password>]]
mapadmin [<computer>] [-u <user> [-p <password>]] {start | stop}
mapadmin [<computer>] [-u <user> [-p <password>]] config <option[...]>
mapadmin [<computer>] [-u <user> [-p <password>]] add -wu <windowsuser> -uu <UNIXuser> [-setprimary]
mapadmin [<computer>] [-u <user> [-p <password>]] add -wg <windowsgroup> -ug <UNIXgroup> [-setprimary]
mapadmin [<computer>] [-u <user> [-p <password>]] setprimary -wu <Windowsuser> [-uu <UNIXuser>]
mapadmin [<computer>] [-u <user> [-p <password>]] setprimary -wg <Windowsgroup> [-ug <UNIXgroup>]
mapadmin [<computer>] [-u <user> [-p <password>]] delete <option[...]>
mapadmin [<computer>] [-u <user> [-p <password>]] list <option[...]>
mapadmin [<computer>] [-u <user> [-p <password>]] backup <filename>
mapadmin [<computer>] [-u <user> [-p <password>]] restore <filename>

The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.

Syntax pattern

Syntax pattern from Microsoft Learn; replace placeholders and choose only one documented alternative before use.

mapadmin [<computer>] [-u <user> [-p <password>]]

Parameters, options and clauses

Option / clauseDescription
<computer>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
-uMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
<user>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
-pMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
<password>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
-wuMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
<windowsuser>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
-uuMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
<UNIXuser>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
-setprimaryMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
-wgMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
<windowsgroup>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
-ugMicrosoft documents this switch; use the linked reference for accepted values, effects and version limits.
<UNIXgroup>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
<filename>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory