PowerShell 中,你可以使用一些命令来处理映像文件,包括挂载、捕捉、卸载、格式转换和编辑映像 导出 复制 删除 获取映像信息 添加驱动程序

PowerShell 中,你可以使用一些命令来处理映像文件,包括挂载、捕捉、卸载、格式转换和编辑映像。以下是一些常用的命令:

  1. 挂载映像(Mount Image):
powershellCopy Code
Mount-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Path "C:\Mount\Directory" -Index 1
  1. 捕捉映像(Capture Image):
powershellCopy Code
New-WindowsImage -CapturePath "C:\Path\To\Capture.wim" -ImagePath "C:\Path\To\Source" -Name "CapturedImage" -Description "Description"
  1. 卸载映像(Unmount Image):
powershellCopy Code
Dismount-WindowsImage -Path "C:\Mount\Directory" -Save
  1. 格式转换映像(Convert Image Format):
powershellCopy Code
Convert-WindowsImage -SourcePath "C:\Path\To\Source.wim" -VHDPath "C:\Path\To\Destination.vhdx" -VHDFormat VHDX
  1. 编辑映像(Edit Image): 你可以先挂载映像,然后对其中的文件进行编辑,最后卸载映像保存修改。
powershellCopy Code
Mount-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Path "C:\Mount\Directory" -Index 1
# 在挂载目录中进行文件操作
Dismount-WindowsImage -Path "C:\Mount\Directory" -Save
  1. 导出映像(Export Image): 将映像导出为一个可移植的文件,可以在其他计算机上使用。
powershellCopy Code
Export-WindowsImage -SourcePath "C:\Path\To\Source.wim" -ImagePath "C:\Path\To\Destination.wim" -CompressionType Fast
  1. 复制映像(Copy Image): 将映像文件复制到指定位置。
powershellCopy Code
Copy-Item -Path "C:\Path\To\Source.wim" -Destination "D:\Path\To\Destination.wim"
  1. 删除映像(Remove Image): 删除不需要的映像文件。
powershellCopy Code
Remove-Item -Path "C:\Path\To\Image.wim"
  1. 获取映像信息(Get Image Info): 获取映像文件的详细信息。
powershellCopy Code
Get-WindowsImage -ImagePath "C:\Path\To\Image.wim" | Select-Object *
  1. 添加驱动程序(Add Driver): 向映像中添加驱动程序。
powershellCopy Code
Add-WindowsDriver -Path "C:\Mount\Directory" -Driver "C:\Path\To\Driver.inf"

 

PowerShell 中,你可以使用一些命令来管理映像文件。以下是一些常用的与映像相关的 PowerShell 命令:

  1. Mount-WindowsImage:挂载 Windows 映像文件以便查看或修改其中的内容。
powershellCopy Code
Mount-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Path "C:\Mount\Directory" -Index 1
  1. Dismount-WindowsImage:卸载已经挂载的 Windows 映像文件。
powershellCopy Code
Dismount-WindowsImage -Path "C:\Mount\Directory" -Save
  1. New-WindowsImage:创建一个新的 Windows 映像文件。
powershellCopy Code
New-WindowsImage -CapturePath "C:\Path\To\Capture.wim" -ImagePath "C:\Path\To\Source" -Name "CapturedImage" -Description "Description"
  1. Export-WindowsImage:导出 Windows 映像文件到另一个位置。
powershellCopy Code
Export-WindowsImage -SourcePath "C:\Path\To\Source.wim" -ImagePath "C:\Path\To\Destination.wim" -CompressionType Fast
  1. Convert-WindowsImage:将 Windows 映像文件转换为其他格式,如 VHD。
powershellCopy Code
Convert-WindowsImage -SourcePath "C:\Path\To\Source.wim" -VHDPath "C:\Path\To\Destination.vhdx" -VHDFormat VHDX

 

  1. Mount-WindowsImage:挂载 Windows 映像文件以便查看或修改其中的内容。
powershellCopy Code
Mount-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Path "C:\Mount\Directory" -Index 1
  1. Dismount-WindowsImage:卸载已经挂载的 Windows 映像文件。
powershellCopy Code
Dismount-WindowsImage -Path "C:\Mount\Directory" -Save
  1. New-WindowsImage:创建一个新的 Windows 映像文件。
powershellCopy Code
New-WindowsImage -CapturePath "C:\Path\To\Capture.wim" -ImagePath "C:\Path\To\Source" -Name "CapturedImage" -Description "Description"
  1. Export-WindowsImage:导出 Windows 映像文件到另一个位置。
powershellCopy Code
Export-WindowsImage -SourcePath "C:\Path\To\Source.wim" -ImagePath "C:\Path\To\Destination.wim" -CompressionType Fast
  1. Convert-WindowsImage:将 Windows 映像文件转换为其他格式,如 VHD。
powershellCopy Code
Convert-WindowsImage -SourcePath "C:\Path\To\Source.wim" -VHDPath "C:\Path\To\Destination.vhdx" -VHDFormat VHDX
  1. Add-WindowsPackage:向映像中添加 Windows 包。
powershellCopy Code
Add-WindowsPackage -Path "C:\Mount\Directory" -PackagePath "C:\Path\To\Package.cab"
  1. Remove-WindowsPackage:从映像中删除 Windows 包。
powershellCopy Code
Remove-WindowsPackage -Path "C:\Mount\Directory" -PackageName "Package Name"

 

  1. Get-WindowsEdition:获取 Windows 映像文件中可用的版本和版本名称。
powershellCopy Code
Get-WindowsEdition -ImagePath "C:\Path\To\Image.wim"
  1. Set-WindowsEdition:将 Windows 映像文件中的版本更改为指定的版本。
powershellCopy Code
Set-WindowsEdition -ImagePath "C:\Path\To\Image.wim" -EditionId "ServerStandard" -ProductKey "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
  1. Get-WindowsImageContent:获取 Windows 映像中的内容(文件和目录)。
powershellCopy Code
Get-WindowsImageContent -ImagePath "C:\Path\To\Image.wim"
  1. Optimize-WindowsImage:对 Windows 映像文件进行优化以减少文件大小。
powershellCopy Code
Optimize-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Mode Full
  1. Add-WindowsDriver:将驱动程序添加到映像中。
powershellCopy Code
Add-WindowsDriver -ImagePath "C:\Path\To\Image.wim" -Driver "C:\Path\To\Driver.inf" -Recurse

 

  1. Remove-WindowsFeature:从 Windows 映像中删除指定的功能。
powershellCopy Code
Remove-WindowsFeature -ImagePath "C:\Path\To\Image.wim" -FeatureName "FeatureName"
  1. Set-WindowsPackageSource:设置用于添加或删除 Windows 包的源。
powershellCopy Code
Set-WindowsPackageSource -ImagePath "C:\Path\To\Image.wim" -PackageName "PackageName" -Source "C:\Path\To\PackageSource"
  1. Get-WindowsOptionalFeature:获取 Windows 映像中安装的可选功能信息。
powershellCopy Code
Get-WindowsOptionalFeature -ImagePath "C:\Path\To\Image.wim"
  1. Set-WindowsOptionalFeature:启用或禁用 Windows 映像中的可选功能。
powershellCopy Code
Set-WindowsOptionalFeature -ImagePath "C:\Path\To\Image.wim" -FeatureName "FeatureName" -Enable
  1. Update-WindowsImage:更新 Windows 映像文件以包括最新的修补程序和更新。
powershellCopy Code
Update-WindowsImage -ImagePath "C:\Path\To\Image.wim"

 

  1. Get-WindowsDriver:获取 Windows 映像中的驱动程序信息。
powershellCopy Code
Get-WindowsDriver -ImagePath "C:\Path\To\Image.wim"
  1. Add-WindowsPackage:将安装程序包添加到 Windows 映像中。
powershellCopy Code
Add-WindowsPackage -ImagePath "C:\Path\To\Image.wim" -PackagePath "C:\Path\To\Package.cab"
  1. Remove-WindowsPackage:从 Windows 映像中删除指定的安装程序包。
powershellCopy Code
Remove-WindowsPackage -ImagePath "C:\Path\To\Image.wim" -PackageName "PackageName"
  1. New-WindowsCustomImage:创建自定义 Windows 映像,包括应用程序和设置。
powershellCopy Code
New-WindowsCustomImage -ImagePath "C:\Path\To\Image.wim" -SourcePath "C:\Path\To\CustomFiles" -SetupCompleteCmd "C:\Path\To\SetupComplete.cmd"
  1. Export-WindowsDriver:将 Windows 映像中的驱动程序导出到指定的文件夹。
powershellCopy Code
Export-WindowsDriver -ImagePath "C:\Path\To\Image.wim" -Destination "C:\Path\To\ExportedDrivers" -Driver "DriverName"

 

  1. Set-WindowsEdition: 将 Windows 映像文件中的版本更改为指定的版本。
powershellCopy Code
Set-WindowsEdition -ImagePath "C:\Path\To\Image.wim" -EditionId "Professional" -ProductKey "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
  1. Get-WindowsImage: 获取 Windows 映像文件的信息,如版本、名称、语言等。
powershellCopy Code
Get-WindowsImage -ImagePath "C:\Path\To\Image.wim"
  1. Get-WindowsPackage: 获取 Windows 映像文件中安装的包信息。
powershellCopy Code
Get-WindowsPackage -ImagePath "C:\Path\To\Image.wim"
  1. Compression: 在创建或操作 Windows 映像时,可以使用压缩参数来控制映像文件的压缩级别,以节省空间。
powershellCopy Code
New-WindowsImage -CompressionType Maximum
  1. Split-WindowsImage: 分割 Windows 映像文件为较小的部分,便于传输或存储。
powershellCopy Code
Split-WindowsImage -ImagePath "C:\Path\To\Image.wim" -SplitPath "C:\Path\To\Split" -FileSize 2000MB

 

  1. Expand-WindowsImage: 展开 Windows 映像文件到指定目录。
powershellCopy Code
Expand-WindowsImage -ImagePath "C:\Path\To\Image.wim" -DestinationPath "C:\Path\To\ExpandedImage"
  1. Get-WindowsImageContent: 获取 Windows 映像文件中的内容信息,如文件列表、大小等。
powershellCopy Code
Get-WindowsImageContent -ImagePath "C:\Path\To\Image.wim"
  1. Mount-WindowsImage: 挂载 Windows 映像文件到指定目录,以便进行修改或查看内容。
powershellCopy Code
Mount-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Path "C:\Path\To\MountedImage" -Index 1
  1. Dismount-WindowsImage: 卸载之前挂载的 Windows 映像文件。
powershellCopy Code
Dismount-WindowsImage -Path "C:\Path\To\MountedImage" -Discard
  1. Get-WindowsImageMetadata: 获取 Windows 映像文件的元数据信息,如创建时间、版本等。
powershellCopy Code
Get-WindowsImageMetadata -ImagePath "C:\Path\To\Image.wim"

 

  1. Add-WindowsDriver: 将驱动程序添加到 Windows 映像中。
powershellCopy Code
Add-WindowsDriver -ImagePath "C:\Path\To\Image.wim" -Driver "C:\Path\To\Driver.inf"
  1. Remove-WindowsDriver: 从 Windows 映像中移除指定的驱动程序。
powershellCopy Code
Remove-WindowsDriver -ImagePath "C:\Path\To\Image.wim" -Driver "DriverName"
  1. Get-WindowsImage: 获取 Windows 映像的信息,如版本、名称、语言等。
powershellCopy Code
Get-WindowsImage -ImagePath "C:\Path\To\Image.wim"
  1. Set-WindowsEdition: 更改 Windows 映像文件的版本。
powershellCopy Code
Set-WindowsEdition -ImagePath "C:\Path\To\Image.wim" -EditionId "Professional" -ProductKey "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
  1. Update-WindowsImage: 更新 Windows 映像文件的配置和设置。
powershellCopy Code
Update-WindowsImage -ImagePath "C:\Path\To\Image.wim" -ConfigurationPath "C:\Path\To\Configuration.xml"

 

  1. New-WindowsImage: 创建新的 Windows 映像文件。
powershellCopy Code
New-WindowsImage -CapturePath "C:\Path\To\Source" -ImagePath "C:\Path\To\Destination\Image.wim" -Name "MyImage" -Description "Windows Image"
  1. Remove-WindowsImage: 从系统中移除指定的 Windows 映像。
powershellCopy Code
Remove-WindowsImage -ImagePath "C:\Path\To\Image.wim"
  1. Set-WindowsImageContent: 更新 Windows 映像文件中的内容。
powershellCopy Code
Set-WindowsImageContent -ImagePath "C:\Path\To\Image.wim" -ContentPath "C:\Path\To\UpdatedContent"
  1. Get-WindowsImageHash: 获取 Windows 映像文件的哈希值。
powershellCopy Code
Get-WindowsImageHash -ImagePath "C:\Path\To\Image.wim"
  1. Export-WindowsImage: 将 Windows 映像文件导出为虚拟硬盘 (VHD) 文件。
powershellCopy Code
Export-WindowsImage -ImagePath "C:\Path\To\Image.wim" -DestinationPath "C:\Path\To\Exported\VHD.vhd" -VhdFormat VHD

 

  1. Split-WindowsImage: 将 Windows 映像文件拆分为多个部分。
powershellCopy Code
Split-WindowsImage -ImagePath "C:\Path\To\Image.wim" -SplitPath "C:\Path\To\SplittedImages" -FileSize 200MB
  1. Merge-WindowsImage: 合并多个分割的 Windows 映像文件。
powershellCopy Code
Merge-WindowsImage -SplitPath "C:\Path\To\SplittedImages" -DestinationPath "C:\Path\To\Merged\Image.wim"
  1. Show-WindowsImage: 显示 Windows 映像文件的详细信息。
powershellCopy Code
Show-WindowsImage -ImagePath "C:\Path\To\Image.wim"
  1. Copy-WindowsImage: 复制 Windows 映像文件到指定位置。
powershellCopy Code
Copy-WindowsImage -ImagePath "C:\Path\To\Image.wim" -DestinationPath "D:\Backup\Image.wim"
  1. Test-WindowsImage: 测试 Windows 映像文件的完整性和有效性。
powershellCopy Code
Test-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Detailed

 

  1. Mount-WindowsImage: 将 Windows 映像文件挂载为虚拟磁盘,并在系统中访问其中的内容。
powershellCopy Code
Mount-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Path "C:\Mount"
  1. Dismount-WindowsImage: 卸载之前挂载的 Windows 映像文件。
powershellCopy Code
Dismount-WindowsImage -Path "C:\Mount" -Discard
  1. Get-WindowsPackage: 获取 Windows 映像文件中安装的软件包列表。
powershellCopy Code
Get-WindowsPackage -Path "C:\Path\To\Image.wim"
  1. Add-WindowsFeature: 将 Windows 功能添加到映像文件中。
powershellCopy Code
Add-WindowsFeature -Name "Web-Server" -ImagePath "C:\Path\To\Image.wim"
  1. Remove-WindowsFeature: 从映像文件中移除指定的 Windows 功能。
powershellCopy Code
Remove-WindowsFeature -Name "Telnet-Client" -ImagePath "C:\Path\To\Image.wim"
  1. Export-WindowsDriver: 将 Windows 映像文件中的驱动程序导出到指定目录。
powershellCopy Code
Export-WindowsDriver -ImagePath "C:\Path\To\Image.wim" -Destination "C:\Path\To\Exported\Drivers"
  1. Import-WindowsDriver: 将之前导出的 Windows 驱动程序添加到映像文件中。
powershellCopy Code
Import-WindowsDriver -Path "C:\Path\To\Exported\Drivers" -Destination "C:\Path\To\Image.wim"
  1. Get-WindowsEdition: 获取 Windows 映像文件中支持的版本 (Edition) 列表。
powershellCopy Code
Get-WindowsEdition -ImagePath "C:\Path\To\Image.wim"
  1. Set-WindowsEdition: 将 Windows 映像文件中的版本设置为指定的版本。
powershellCopy Code
Set-WindowsEdition -ImagePath "C:\Path\To\Image.wim" -Edition "Enterprise"
  1. Get-WindowsImage: 获取 Windows 映像文件的详细信息。
powershellCopy Code
Get-WindowsImage -ImagePath "C:\Path\To\Image.wim"

 

  1. Set-WindowsImage: 修改 Windows 映像文件的设置,如描述信息、版本号等。
powershellCopy Code
Set-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Description "Customized Windows Image" -Version 2.0
  1. Get-WindowsDriver: 获取 Windows 映像文件中包含的驱动程序信息。
powershellCopy Code
Get-WindowsDriver -ImagePath "C:\Path\To\Image.wim"
  1. Get-WindowsImageMetadata: 获取 Windows 映像文件的元数据信息。
powershellCopy Code
Get-WindowsImageMetadata -ImagePath "C:\Path\To\Image.wim"
  1. Update-WindowsImage: 将 Windows 映像文件中的组件更新为最新版本。
powershellCopy Code
Update-WindowsImage -ImagePath "C:\Path\To\Image.wim" -PackagePath "C:\Path\To\Updates"
  1. Remove-WindowsDriver: 从 Windows 映像文件中移除指定的驱动程序。
powershellCopy Code
Remove-WindowsDriver -ImagePath "C:\Path\To\Image.wim" -Driver "IntelGraphics"

 

  1. New-WindowsImage: 创建一个新的 Windows 映像文件。
powershellCopy Code
New-WindowsImage -Edition "Enterprise" -Size "50GB" -ImagePath "C:\Path\To\New\Image.wim"
  1. Set-WindowsEdition: 根据指定的 Edition ID,将 Windows 映像文件中的版本设置为指定的版本。
powershellCopy Code
Set-WindowsEdition -ImagePath "C:\Path\To\Image.wim" -EditionId "Professional" -ImageIndex 1
  1. Get-WindowsOptionalFeature: 获取 Windows 映像文件中安装的可选功能列表。
powershellCopy Code
Get-WindowsOptionalFeature -Path "C:\Path\To\Image.wim"
  1. Add-WindowsDriver: 将驱动程序添加到 Windows 映像文件中。
powershellCopy Code
Add-WindowsDriver -ImagePath "C:\Path\To\Image.wim" -Driver "C:\Path\To\Driver.inf"
  1. Remove-WindowsDriverPackage: 从 Windows 映像文件中移除指定的驱动程序包。
powershellCopy Code
Remove-WindowsDriverPackage -Path "C:\Path\To\Image.wim" -DriverPackage "IntelGraphics"

 

  1. Mount-WindowsImage: 挂载 Windows 映像文件以便访问其中的内容。
powershellCopy Code
Mount-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Path "C:\Mount\Point"
  1. Dismount-WindowsImage: 卸载已挂载的 Windows 映像文件。
powershellCopy Code
Dismount-WindowsImage -Path "C:\Mount\Point" -Save
  1. Get-WindowsPackage: 获取 Windows 映像文件中安装的软件包列表。
powershellCopy Code
Get-WindowsPackage -Path "C:\Path\To\Image.wim"
  1. Add-WindowsImage: 将已存在的 Windows 映像文件添加到另一个映像文件中。
powershellCopy Code
Add-WindowsImage -ImagePath "C:\Path\To\Target\Image.wim" -CapturePath "C:\Path\To\Source\Image.wim" -Name "AdditionalImage"
  1. Remove-WindowsImage: 从 Windows 映像文件中移除指定的映像。
powershellCopy Code
Remove-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Index 2

 

  1. Export-WindowsDriver: 将 Windows 映像文件中的驱动程序导出到指定目录。
powershellCopy Code
Export-WindowsDriver -Online -Destination "C:\Path\To\Drivers"
  1. Get-WindowsImage: 获取 Windows 映像文件的信息,包括版本、索引等。
powershellCopy Code
Get-WindowsImage -ImagePath "C:\Path\To\Image.wim"
  1. Split-WindowsImage: 将较大的 Windows 映像文件分割成多个较小的部分。
powershellCopy Code
Split-WindowsImage -ImagePath "C:\Path\To\Large\Image.wim" -SplitPath "C:\Path\To\Output\Folder" -FileSize 4GB
  1. Set-WindowsPackage: 修改 Windows 映像文件中软件包的属性或设置。
powershellCopy Code
Set-WindowsPackage -Path "C:\Path\To\Image.wim" -Package "PackageName" -Property "Value"
  1. Add-WindowsFeature: 向 Windows 映像文件中添加新的功能或角色。
powershellCopy Code
Add-WindowsFeature -Path "C:\Path\To\Image.wim" -FeatureName "Web-Server" -IncludeAllSubFeature

 

  1. Get-WindowsImageContent: 获取 Windows 映像文件中的内容列表。
powershellCopy Code
Get-WindowsImageContent -ImagePath "C:\Path\To\Image.wim"
  1. Expand-WindowsImage: 将 Windows 映像文件中的内容解压缩到指定目录。
powershellCopy Code
Expand-WindowsImage -ImagePath "C:\Path\To\Image.wim" -DestinationPath "C:\Path\To\Output\Folder"
  1. Remove-WindowsImage: 删除不再需要的 Windows 映像文件。
powershellCopy Code
Remove-WindowsImage -Path "C:\Path\To\Image.wim"
  1. Update-WindowsImage: 更新 Windows 映像文件中的组件或驱动程序。
powershellCopy Code
Update-WindowsImage -ImagePath "C:\Path\To\Image.wim" -PackagePath "C:\Path\To\Updates"
  1. Get-WindowsImageHash: 获取 Windows 映像文件的哈希值,用于验证文件完整性。
powershellCopy Code
Get-WindowsImageHash -ImagePath "C:\Path\To\Image.wim"

 

  1. New-WindowsImage: 创建一个新的 Windows 映像文件。
powershellCopy Code
New-WindowsImage -ImagePath "C:\Path\To\New\Image.wim" -Edition "Enterprise" -SizeBytes 10GB
  1. Get-WindowsOptionalFeature: 获取 Windows 映像文件中可选功能的列表。
powershellCopy Code
Get-WindowsOptionalFeature -Path "C:\Path\To\Image.wim"
  1. Remove-WindowsDriver: 从 Windows 映像文件中删除驱动程序。
powershellCopy Code
Remove-WindowsDriver -Path "C:\Path\To\Image.wim" -Driver "DriverName"
  1. Set-WindowsEditionUpgrade: 将 Windows 映像文件升级到更高版本。
powershellCopy Code
Set-WindowsEditionUpgrade -ImagePath "C:\Path\To\Image.wim" -TargetEdition "Enterprise"
  1. Get-WindowsDriver: 获取 Windows 映像文件中安装的驱动程序列表。
powershellCopy Code
Get-WindowsDriver -Path "C:\Path\To\Image.wim"

 

  1. Get-WindowsEdition: 获取 Windows 映像文件中可用的版本和版本号。
powershellCopy Code
Get-WindowsEdition -Path "C:\Path\To\Image.wim"
  1. Dismount-WindowsImage: 卸载已经加载的 Windows 映像文件。
powershellCopy Code
Dismount-WindowsImage -Path "C:\Path\To\Mounted\Image"
  1. Set-WindowsEditionDowngrade: 将 Windows 映像文件降级到更低版本。
powershellCopy Code
Set-WindowsEditionDowngrade -ImagePath "C:\Path\To\Image.wim" -TargetEdition "Pro"
  1. Add-WindowsDriver: 向 Windows 映像文件中添加新的驱动程序。
powershellCopy Code
Add-WindowsDriver -Path "C:\Path\To\Image.wim" -Driver "C:\Path\To\Driver.inf"
  1. Set-WindowsEdition: 修改 Windows 映像文件的版本信息。
powershellCopy Code
Set-WindowsEdition -ImagePath "C:\Path\To\Image.wim" -Edition "Professional"

 

  1. Mount-WindowsImage: 挂载 Windows 映像文件以便查看或修改其中的内容。
powershellCopy Code
Mount-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Path "C:\Path\To\Mount\Point"
  1. Add-WindowsPackage: 向 Windows 映像文件中添加新的软件包。
powershellCopy Code
Add-WindowsPackage -Path "C:\Path\To\Image.wim" -PackagePath "C:\Path\To\Package.cab"
  1. Get-WindowsImage: 获取有关 Windows 映像文件的详细信息,如版本、架构等。
powershellCopy Code
Get-WindowsImage -ImagePath "C:\Path\To\Image.wim"
  1. Set-WindowsImage: 修改 Windows 映像文件的属性,如描述、名称等。
powershellCopy Code
Set-WindowsImage -ImagePath "C:\Path\To\Image.wim" -Description "New Description"
  1. Export-WindowsDriver: 导出 Windows 映像文件中的驱动程序到指定目录。
powershellCopy Code
Export-WindowsDriver -Online -Destination "C:\Path\To\Exported\Drivers"

 

posted @ 2024-02-26 12:02  suv789  阅读(41)  评论(0编辑  收藏  举报