Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade
Exporting a Windows image is a crucial task for system administrators who need to create backups, deploy new systems, or migrate existing setups. The Export-WindowsImage
cmdlet in PowerShell allows you to export a Windows image (.wim) file to another location. This cmdlet is particularly useful when you need to customize and deploy Windows images across multiple machines efficiently. This article will guide you through the process of using the Export-WindowsImage
cmdlet in PowerShell to export a Windows image.
Examples:
Open PowerShell as Administrator:
Win + X
and select "Windows PowerShell (Admin)" or "Windows Terminal (Admin)" if you are using Windows Terminal.Identify the Source Image:
C:\Images\install.wim
.Run the Export-WindowsImage Cmdlet:
Use the following command to export the image to a new file:
Export-WindowsImage -SourceImagePath C:\Images\install.wim -SourceIndex 1 -DestinationImagePath C:\ExportedImages\custom_install.wim -CheckIntegrity
Parameters:
-SourceImagePath
: Specifies the path to the source .wim file.-SourceIndex
: Specifies the index of the image within the .wim file (use 1
if there's only one image).-DestinationImagePath
: Specifies the path where the exported .wim file will be saved.-CheckIntegrity
: Verifies the integrity of the .wim file during the export process.List Images in the .wim File:
Get-WindowsImage -ImagePath C:\Images\install.wim
Export the Desired Image Index:
Export-WindowsImage
cmdlet to export the specific image:
Export-WindowsImage -SourceImagePath C:\Images\install.wim -SourceIndex 2 -DestinationImagePath C:\ExportedImages\custom_install_index2.wim -CheckIntegrity
Use the -CompressionType
Parameter:
You can specify the compression type to reduce the size of the exported .wim file:
Export-WindowsImage -SourceImagePath C:\Images\install.wim -SourceIndex 1 -DestinationImagePath C:\ExportedImages\compressed_install.wim -CheckIntegrity -CompressionType Maximum
Compression Types:
Fast
: Provides faster compression.Maximum
: Provides maximum compression, resulting in a smaller file size.