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"