automountautomount

适用于:Windows Server(半年频道)、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012Applies To: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

重要

在存储区域网络 (SAN) 配置中,禁用自动装载会阻止 Windows 自动将驱动器号装入或分配给系统可以看到的任何新基本卷。In storage area network (SAN) configurations, disabling automount prevents Windows from automatically mounting or assigning drive letters to any new basic volumes that are visible to the system.

语法Syntax

自动装载 [{enable | disable | 推移}] [noerr]automount [ { enable | disable | scrub } ] [noerr]

参数Parameters

参数Parameter 说明Description
enableenable 使 Windows 能够自动挂载添加到系统的新基本卷和动态卷,并为其分配驱动器号。Enables Windows to automatically mount new basic and dynamic volumes that are added to the system and to assign them drive letters.
disabledisable 阻止 Windows 自动安装添加到系统中的任何新基本卷和动态卷。Prevents Windows from automatically mounting any new basic and dynamic volumes that are added to the system.

注意:禁用自动装载可能导致故障转移群集无法通过验证配置向导的存储部分。Note: Disabling automount can cause failover clusters to fail the storage portion of the Validate a Configuration Wizard.

scrubscrub 删除不再位于系统中的卷的卷装入点目录和注册表设置。Removes volume mount point directories and registry settings for volumes that are no longer in the system. 该操作防止自动装入已经位于系统中的卷,并防止在其重新添加到系统时给定以前的卷装入点。This prevents volumes that were previously in the system from being automatically mounted and given their former volume mount point(s) when they are added back to the system.
noerrnoerr 仅用于脚本。For scripting only. 出现错误时,DiskPart 继续处理命令,就像未发生错误一样。When an error is encountered, DiskPart continues to process commands as if the error did not occur. 如果没有此参数,则错误会导致 DiskPart 退出并出现错误代码。Without this parameter, an error causes DiskPart to exit with an error code.

示例Examples

若要查看是否已启用自动装载功能,请在 diskpart 命令中键入以下命令:To see if the automount feature is enabled, type the following commands from within the diskpart command:

automount

若要启用自动装载功能,请键入:To enable the automount feature, type:

automount enable

若要禁用自动装载功能,请键入:To disable the automount feature, type:

automount disable

其他参考Additional References