在没有安装 ADK 的系统 上运行 DISM cmdlet

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hadstj/article/details/49453975

Dism cmdlet 要比 Dism 命令使用方便,但唯一不足的是,好像只能安装 msu 和 cab 文件,而不能安装 mum 文件,也可能是我没有能够正确使用吧。
一、从安装 ADK 系统上复制文件,具体目录:
C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools\amd64\Dism
二、在目标系统上运行:
WimMountAdkSetupAmd64.exe /Install /q
三、导入 Dism 模块:
import-module Dism 目录的路径
四、Dism cmdlet 与 Dism 命令对照表:
(表格来自微软)

DISM cmdlet Dism.exe 命令
Add-WindowsImage Dism.exe /Append-Image
Expand-WindowsImage Dism.exe /Apply-Image
New-WindowsImage Dism.exe /Capture-Image
Clear-WindowsCorruptMountPoint Dism.exe /Cleanup-MountPoints
Save-WindowsImage Dism.exe /Commit-Image
Export-WindowsImage Dism.exe /Export-Image
Get-WindowsImage Dism.exe /Get-ImageInfo
Get-WindowsImage -Mounted Dism.exe /Get-MountedImageInfo
Get-WIMBootEntry Dism.exe /Get-WimBootEntry
Get-WindowsImageContent Dism.exe /List-Image
Mount-WindowsImage Dism.exe /Mount-Image
Split-WindowsImage Dism.exe /Split-Image
Remove-WindowsImage Dism.exe /Remove-Image
Mount-WindowsImage -Remount Dism.exe /Remount-Image
Dismount-WindowsImage Dism.exe /Unmount-Image
Update-WIMBootEntry Dism.exe /Update-WimBootEntry
Add-WindowsDriver Dism.exe /Image:<…> /Add-Driver
Add-WindowsPackage Dism.exe /Image:<…> /Add-Package
Add-AppxProvisionedPackage Dism.exe /Image:<…> /Add-ProvisionedAppxPackage
Apply-WindowsUnattend Dism.exe /Image:<…> /Apply-Unattend
Repair-WindowsImage -CheckHealth Dism.exe /Image:<…> /Cleanup-Image /CheckHealth
Repair-WindowsImage –ScanHealth Dism.exe /Image:<…> /Cleanup-Image /ScanHealth
Repair-WindowsImage –RestoreHealth Dism.exe /Image:<…> /Cleanup-Image /RestoreHealth
Disable-WindowsOptionalFeature Dism.exe /Image:<…> /Disable-Feature
Enable-WindowsOptionalFeature Dism.exe /Image:<…> /Enable-Feature
Export-WindowsDriver Dism.exe /Image:<…> /Export-Driver
Get-WindowsEdition -Current Dism.exe /Image:<…> /Get-CurrentEdition
Get-WindowsDriver -Driver Dism.exe /Image:<…> /Get-Driverinfo
Get-WindowsDriver Dism.exe /Image:<…> /Get-Drivers
Get-WindowsOptionalFeature -FeatureName Dism.exe /Image:<…> /Get-Featureinfo
Get-WindowsOptionalFeature Dism.exe /Image:<…> /Get-Features
Get-WindowsPackage -PackagePath -PackageName
Get-WindowsPackage Dism.exe /Image:<…> /Get-Packages
Get-AppxProvisionedPackage Dism.exe /Image:<…> /Get-ProvisionedAppxPackages
Get-WindowsEdition -Target Dism.exe /Image:<…> /Get-TargetEditions
Optimize-WindowsImage Dism.exe /Image:<…> /Optimize-Image
Remove-WindowsDriver Dism.exe /Image:<…> /Remove-Driver
Remove-WindowsPackage Dism.exe /Image:<…> /Remove-Package
Remove-AppxProvisionedPackage Dism.exe /Image:<…> /Remove-ProvisionedAppxPackage
Set-WindowsEdition Dism.exe /Image:<…> /Set-Edition
Set-WindowsProductKey Dism.exe /Image:<…> /Set-ProductKey
Set-AppXProvisionedDataFile Dism.exe /Image:<…> /Set-ProvisionedAppxDataFile
阅读更多

没有更多推荐了,返回首页