Using the Export-Image Command

Applies To: Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Exports an existing image from the image store to another Windows Image (.wim) file.


for boot images:

wdsutil [Options] /Export-Imagmedia:<Image name> [/Server:<Server name>]
   mediatype:Boot /Architecture:{x86 | ia64 | x64} [/Filename:<File name>]
         /Filepath:<File path and name>
     [/Overwrite:{Yes | No}]

for install images:

wdsutil [Options] /Export-Imagmedia:<Image name> [/Server:<Server name>]
   mediatype:InstallmediaGroup:<Image group name>]
     [/Filename:<File name>]
         /Filepath:<File path and name>
     [/Overwrite:{Yes | No | append}]


Parameter Description
media: Specifies the name of the image to be exported.
[/Server:] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.
mediatype:{Boot | Install} Specifies the type of image to be exported.
\mediaGroup:] Specifies the image group containing the image to be exported. If no image group name is specified and only one image group exists on the server, that image group will be used by default. If more than one image group exists on the server, the image group must be specified.
/Architecture:{x86 | ia64 | x64} Specifies the architecture of the image to be exported. Because it is possible to have the same image name for boot images in different architectures, specifying the architecture value ensures that the correct image will be returned.
[/Filename:] if the image cannot be uniquely identified by name, the file name must be specified.
/DestinationImage Specifies the settings for the destination image. You can specify these settings using the following options:

- /Filepath: - Specifies the full file path for the new image.
- [/Name:] - Sets the display name of the image. If no name is specified, the display name of the source image will be used.
- [/Description: ] - Sets the description of the image.
[/Overwrite:{Yes | No | append}] Determines whether the file specified in the /DestinationImage option will be overwritten if an existing file with that name already exists at the /Filepath.

- Yes causes the existing file to be overwritten.
- No (the default option) causes an error to occur if a file with the same name already exists.
- append causes the generated image to be appended as a new image within the existing .wim file.


To export a boot image, type one of the following:

wdsutil /Export-Imagmedia:"WinPE boot imagemediatype:Boot /Architecture:x86 /DestinationImage /Filepath:"C:\temp\boot.wim"
wdsutil /verbose /Progress /Export-Imagmedia:"WinPE boot image" /Server:MyWDSServemediatype:Boot /Architecture:x64 /Filename:boot.wim 
/DestinationImage /Filepath:"\\Server\Share\ExportImage.wim" /Name:"Exported WinPE image" /Description:"WinPE Image from WDS server" /Overwrite:Yes

To export an install image, type one of the following:

wdsutil /Export-Imagmedia:"Windows Vista with Officemediatype:Install /DestinationImage /Filepath:"C:\Temp\Install.wim"
wdsutil /verbose /Progress /Export-Imagmedia:"Windows Vista with Office" /Server:MyWDSServemediatype:InstalmediaGroup:ImageGroup1 
/Filename:install.wim /DestinationImage /Filepath:\\server\share\export.wim /Name:"Exported Windows image" /Description:"Windows Vista image from WDS server" /Overwrite:append

additional references

Command-Line Syntax Key Using the add-Image Command Using the copy-Image Command Using the get-Image Command Using the remove-Image Command Using the replace-Image Command Subcommand: set-Image