wdsutil add-image

适用范围:Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows Server 2012 R2、Windows Server 2012

将映像添加到 Windows 部署服务服务器。

语法

对于启动映像,请使用以下语法:

wdsutil /Add-Image /ImageFile:<wim file path> [/Server:<Server name> /ImageType:Boot [/SkipVerify] [/Name:<Image name>] [/Description:<Image description>] [/Filename:<New wim file name>]

对于安装映像,请使用以下语法:

wdsutil /Add-Image /ImageFile:<wim filepath> [/Server:<Servername>] /ImageType:Install [/SkipVerify] /ImageGroup:<Image group name>] [/SingleImage:<Single image name>] [/Name:<Name>] [/Description:<Description>] [/Filename:<File name>] [/UnattendFile:<Unattend file path>]

参数

参数 说明
/ImageFile:<.wim filepath> 指定包含要添加的映像的 Windows 映像文件 (.wim) 的完整路径和文件名。
[/Server:<Servername>] 指定服务器的名称。 可以是 NetBIOS 名称或完全限定域名 (FQDN)。 如果未指定服务器名称,则使用本地服务器。
[/ImageType:{Boot \| Install}] 指定要添加的映像的类型。
[/SkipVerify] 指定在添加映像之前,不会对源映像文件执行完整性验证。
[/Name:<Name>] 设置映像的显示名称。
[/Description:<Description>] 设置映像的说明。
[/Filename:<Filename>] 指定 .wim 文件的新文件名。 这样,你可以在添加映像时更改 .wim 文件的文件名。 如果未指定文件名,会使用源映像文件名。 在所有情况下,Windows 部署服务都会检查来确定文件名在目标计算机的启动映像存储中是否唯一。
/ImageGroup:<Imagegroupname>] 指定要在其中添加映像的映像组的名称。 如果服务器上存在多个映像组,必须指定映像组。 如果未指定映像组,并且映像组尚不存在,则会创建一个新的映像组。 否则,将使用现有映像组。
[/SingleImage:<Singleimagename>] [/Name:<Name>] [/Description:<Description>] 从 .wim 文件复制指定的单个映像,并设置映像的显示名称和说明。
[/UnattendFile:<Unattendfilepath>] 指定要与将添加的映像关联的无人参与安装文件的完整路径。 如果未指定 /SingleImage,则同一个无人参与文件与 .wim 文件中的所有映像相关联。

示例

要添加启动映像,请键入:

wdsutil /Add-Image /ImageFile:"C:\MyFolder\Boot.wim" /ImageType:Boot
wdsutil /Verbose /Progress /Add-Image /ImageFile:\\MyServer\Share\Boot.wim /Server:MyWDSServer /ImageType:Boot /Name:"My WinPE Image" /Description:"WinPE Image containing the WDS Client" /Filename:WDSBoot.wim

要添加安装映像,请键入以下命令之一:

wdsutil /Add-Image /ImageFile:"C:\MyFolder\Install.wim" /ImageType:Install
wdsutil /Verbose /Progress /Add-Image /ImageFile:\\MyServer\Share\Install.wim /Server:MyWDSServer /ImageType:Install /ImageGroup:ImageGroup1
/SingleImage:"Windows Pro" /Name:"My WDS Image" /Description:"Windows Pro image with Microsoft Office" /Filename:"Win Pro.wim" /UnattendFile:"\\server\share\unattend.xml"