惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Heimdal Security Blog
A
Arctic Wolf
K
Kaspersky official blog
V
Vulnerabilities – Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
L
LINUX DO - 热门话题
MongoDB | Blog
MongoDB | Blog
T
Threat Research - Cisco Blogs
D
Docker
爱范儿
爱范儿
T
Tenable Blog
C
Check Point Blog
B
Blog
C
Cisco Blogs
Vercel News
Vercel News
The Cloudflare Blog
T
Threatpost
NISL@THU
NISL@THU
T
Tor Project blog
V2EX - 技术
V2EX - 技术
P
Palo Alto Networks Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tailwind CSS Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
SecWiki News
SecWiki News
博客园 - 司徒正美
S
Security @ Cisco Blogs
GbyAI
GbyAI
S
Secure Thoughts
Microsoft Security Blog
Microsoft Security Blog
The Register - Security
The Register - Security
Recorded Future
Recorded Future
Cloudbric
Cloudbric
Webroot Blog
Webroot Blog
N
News and Events Feed by Topic
Y
Y Combinator Blog
博客园_首页
T
Troy Hunt's Blog
The Hacker News
The Hacker News
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
U
Unit 42
AWS News Blog
AWS News Blog
PCI Perspectives
PCI Perspectives
V
Visual Studio Blog
博客园 - 聂微东
有赞技术团队
有赞技术团队
酷 壳 – CoolShell
酷 壳 – CoolShell

博客园 - osoft

Sound Disable-Download-Chrome-AI-Mode Audio-Channel DAR-PAR-SAR ffmpeg-layouts Blender-Tank-Tracks Blender-Curve Bézier-curve Bézier-VS-NURBS Walking-leg-mechanism-in-Blender Blender-Armatures Blender-Rigid-Body Simulate-pendulum-motion-using-Blender Platonic-solids Differential-Gear otvinta-Bevel-Gear-Calculator Bevel-gears Epicyclic-gearing Blender-Gears Blender5-WindowUI Video-file-size Windows-Execution-Policies Windows-PowerShell-prompt Windows-UAC Windows-Commands-prompt Windows-GameBar-ErrorLog Microsoft-Store-error Chrome-Gemini-Nano Windows-sfc Windows-Delivery-Optimization Windows-icacls Dism-Cleanup-image Windows11-GPT Generate-MAC-Address
DISM-Get-cmds
osoft · 2025-11-08 · via 博客园 - osoft
1. DISM-Get-cmds
2. 获取 Windows 映像信息
	2.1 Get-ImageInfo(Get-WimInfo)
	2.2 Get-MountedImageInfo(Get-MountedWimInfo)
3. 获取 Windows PE 信息
	3.1 Get-PESettings
4. 获取驱动程序信息
	4.1 Get-Drivers(list-t)
	4.2 Get-DriverInfo(list-t)
5. 获取包和功能信息
	5.1 Get-Packages(list-t)
	5.2 Get-PackageInfo
6. 列出映像中的所有功能
	6.1 Get-Features
	6.2 Get-FeatureInfo
7. 获取按需功能信息
	7.1 Get-Capabilities
	7.2 Get-CapabilityInfo
8. 获取应用包(.appx)维护信息
	8.1 Get-ProvisionedAppxPackages
9. 获取国际设置和语言
	9.1 Get-Intl
a. 获取 Windows 版本信息
	a.1 Get-CurrentEdition
	a.2 Get-TargetEditions
b. 获取应用程序修补程序信息(脱机映像)
	b.1 Get-AppPatchInfo(已安装MSP修补程序的信息)
	b.2 Get-AppPatches(已应用于应用程序的MSP修补程序的信息)
	b.3 Get-Apps(所有Windows-Installer应用程序(MSI)的信息)
	b.4 Get-AppInfo(特定Windows-Installer应用程序(MSI)的信息)
c. 其他Get命令
	c.1 Get-WIMBootEntry
	c.2 Get-NonRemovableAppPolicy
	c.3 Get-ReservedStorageState
	c.4 Get-DefaultAppAssociations
	c.5 Get-ProvisioningPackageInfo
	c.6 Get-OSUninstallWindow

1. DISM-Get-cmds

本文盘点了DISM工具里的get命令。主要包含 (dism /?) 和 (dism /online /?) 帮助里的get-...

下文中命令中的( |find /c " :")统计行数的后缀,查看具体信息,去掉这个后缀即可。

使用 DISM 盘点映像或组件

可以盘点 Windows 映像中包含的驱动程序、包以及其他文件和设置。  为此,可以使用部署映像维护和管理 (DISM) 维护命令。

必须先从 WIM 或 VHD 文件装载脱机映像,然后才能盘点或维护特定的 Windows 映像。

Dism可以操作的对象有3类:

  • 1. (*.wim)文件可用一下选项指定
    • /imagefile:D:\WinPE_amd64\media\sources\boot.wim
    • /WimFile:D:\DiskPart\WindowsRE\winre.wim
  • 2. (mount装载)将wim文件装载到目录的系统(是安装ADK后初始wim文件mount)
    • /Image:"D:\WinPE_amd64\mount"
  • 3. (Windows)当前系统(本机使用了一段时间的 Windows 11系统。)
    • /online

2. 获取 Windows 映像信息

DISM - 适用于 Windows 的部署映像维护和管理技术参考

若要指定 VHD 文件中的映像,必须使用 /Index:1。

2.1 Get-ImageInfo(Get-WimInfo)

列出 WIM 或 VHD 文件中包含的映像: Index 索引; 名称; 说明; 大小.

Dism /Get-ImageInfo /imagefile:D:\DiskPart\WindowsRE\winre.wim

Dism /Get-ImageInfo /imagefile:D:\WinPE_amd64\media\sources\boot.wim

DISM /Get-WimInfo /WimFile:D:\DiskPart\WindowsRE\winre.wim

DISM /Get-WimInfo /WimFile:D:\WinPE_amd64\media\sources\boot.wim

2.2 Get-MountedImageInfo(Get-MountedWimInfo)

列出已装载的映像: Index 索引; 目录; 文件; 状态等.

dism /Get-MountedImageInfo

dism /Get-MountedWimInfo

安装目录: D:\WinPE_amd64\mount

映像文件: D:\WinPE_amd64\media\sources\boot.wim

映像索引: 1

安装的读/写: 是

状态: 确定

3. 获取 Windows PE 信息

DISM Windows PE 维护命令行选项

3.1 Get-PESettings

列出已装载 Windows PE 映像中的所有设置

dism /Get-PESettings /Image:"D:\WinPE_amd64\mount"

Windows PE Settings:

Scratch Space : 32MB (暂存空间: 在 ramdisk 模式下启动 Windows PE 系统卷时,其上可用的可写空间量。)

Target Path : X:\ (启动时 Windows PE 映像根目录的路径。)

4. 获取驱动程序信息

 DISM 驱动程序维护命令行选项

驱动程序维护命令可用于根据驱动程序存储中驱动程序包的 .inf 文件枚举这些包。

可以使用 /Get 命令显示有关脱机映像中第三方驱动程序包或所有驱动程序包的基本信息。 

指向某个脱机映像或正在运行的操作系统时,可以确定该映像中包含哪些驱动程序包,并获取有关驱动程序的信息。

可以显示有关特定的已安装 .inf 文件或尚未安装的文件的详细信息。

驱动程序存储中已安装的驱动程序将命名为 Oem0.inf、Oem1.inf 等。

4.1 Get-Drivers(list-t)

列出脱机映像中的驱动程序包

Dism /Get-Drivers /Image:"D:\WinPE_amd64\mount"

Obtaining list of 3rd party drivers from the driver store... Driver packages listing: (No drivers found in the image matching the criteria)

Dism /Get-Drivers /Image:"D:\WinPE_amd64\mount" /all |find /c " :"

2282 (7*326)

Dism /Get-Drivers /Image:"D:\WinPE_amd64\mount" /all |find /c "Published Name :"

326

Dism /Get-Drivers /online |find /c " :"

273 (7*39)

Dism /Get-Drivers /online /all |find /c " :"

5278 (7*754)

Published Name : netloop.inf (已发布的名称)

Original File Name : netloop.inf (原始文件名)

Inbox : Yes (内置驱动程序Yes; 第三方:No)

Class Name : Net (设备类名称)

Provider Name : Microsoft (提供者)

Date : 2006/6/21 (日期)

Version : 10.0.26100.1 (版本)

4.2 Get-DriverInfo(list-t)

获取有关特定驱动程序的信息

Dism /Image:"D:\WinPE_amd64\mount" /Get-DriverInfo /driver:usb.inf |find /c " :"

604 (&*86)

Dism /online /Get-DriverInfo /driver:oem1.inf |find /c " :"

688 (7*98)

已发布的名称 : oem1.inf

驱动程序存储路径 : C:\Windows\System32\DriverStore\FileRepository\iigd_dch.inf_amd64_ce1c886f6e0c455f\iigd_dch.inf

类名称 : Display

类描述 : 显示适配器

类 GUID : {4D36E968-E325-11CE-BFC1-08002BE10318}

日期 : 2021/7/23

版本 : 30.0.100.9805

启动关键 : 否

体系结构的驱动程序 : amd64

(下面是一串列表...)

    制造商 : Intel Corporation

    描述 : Intel(R) HD Graphics 630

    体系结构 : amd64

    硬件 ID : PCI\VEN_8086&DEV_5912

    服务名称 : igfx

    兼容 ID :  (设备的备用即插即用 (PnP) ID(如果有)。)

    排除 ID :  (与设备不匹配的 PnP ID(任何适用)。)

5. 获取包和功能信息

DISM 操作系统包维护命令行选项

可以使用操作系统包维护命令获取有关 Windows 包的信息。 还可以使用 DISM 和包维护命令来获取有关 Windows 功能(无论是脱机还是在运行中的 Windows 安装上)的信息。

  • 可以使用 /PackagePath 选项指定 .cab 文件,或该 .cab 文件解压缩到的文件夹。 不能使用此命令获取 .msu 文件的包信息。
  • 可以使用 /Get-Packages 查找包的名称,然后使用 /PackageName 指定包的名称。
  • 可以使用 /Get-FeatureInfo /FeatureName:<name> 选项显示有关功能的详细信息。

5.1 Get-Packages(list-t)

列出映像中的所有包

Dism /Get-Packages /Image:"D:\WinPE_amd64\mount"

Packages listing:

Package Identity : Microsoft-Windows-WinPE-LanguagePack-Package~31bf3856ad364e35~amd64~en-US~10.0.26100.1

State : Installed

Release Type : Language Pack

Install Time : 2024/4/1 7:45

Package Identity : Microsoft-Windows-WinPE-Package~31bf3856ad364e35~amd64~~10.0.26100.1

State : Installed

Release Type : Foundation

Install Time : 2024/4/1 7:40

Dism /Get-Packages /online |find /c " :"

1112 (4*278)

其中Release Type(发布类型)包含: 功能包; 语言包; Foundation(核心包)

5.2 Get-PackageInfo

列出有关特定包的信息

Dism /Image:"D:\WinPE_amd64\mount" /Get-PackageInfo /PackagePath:C:\packages\WinPE-Dot3Svc.cab

Dism /Image:"D:\WinPE_amd64\mount" /Get-PackageInfo /PackageName:Microsoft-Windows-WinPE-Package~31bf3856ad364e35~amd64~~10.0.26100.1

Dism /online /Get-PackageInfo /PackagePath:C:\packages\WinPE-Dot3Svc.cab

Dism /online /Get-PackageInfo /PackageName:Microsoft-Windows-Foundation-Package~31bf3856ad364e35~amd64~~10.0.26100.1

Dism /online /Get-PackageInfo /PackageName:Microsoft-Windows-Wifi-Client-Realtek-Rtwlane13-FOD-Package~31bf3856ad364e35~amd64~~10.0.26100.1742

详细信息中的State状态包含: 已安装; 未安装; Install Pending需要重启才能完成安装; Staged暂存

6. 列出映像中的所有功能

6.1 Get-Features

Dism /Image:"D:\WinPE_amd64\mount" /Get-Features

Dism /Image:"D:\WinPE_amd64\mount" /Get-Features /PackageName:Microsoft-Windows-WinPE-Package~31bf3856ad364e35~amd64~~10.0.26100.1

Dism /Image:"D:\WinPE_amd64\mount" /Get-Features /PackagePath:C:\packages\WinPE-Dot3Svc.cab

Dism /online /Get-Features |find /c " :"

267…

Dism /online /Get-Features /PackageName:Microsoft-Windows-Wifi-Client-Realtek-Rtwlane13-FOD-Package~31bf3856ad364e35~amd64~~10.0.26100.1742

Dism /online /Get-Features /PackagePath:C:\packages\WinPE-Dot3Svc.cab

State状态包含: 

  • 已启用。 功能已启用。
  • 已禁用。 此功能已禁用。
  • Enable Pending。 将启用该功能,但需要重启才能完成挂起的联机操作。
  • Disable Pending。 将禁用该功能,但需要重启才能完成挂起的联机操作。
  • Disabled with Payload Removed。功能已禁用,并且其有效负载已删除。 映像中仅存在包元数据。可以在部署映像后还原有效负载并按需启用该功能。 有关按需功能的详细信息,请参阅配置 Windows 修复源。

6.2 Get-FeatureInfo

列出有关特定功能的信息, 功能描述Description等... 

Dism /Image:"D:\WinPE_amd64\mount" /Get-FeatureInfo /FeatureName:SMB1Protocol

Dism /online /Get-FeatureInfo /FeatureName:SMB1Protocol

7. 获取按需功能信息

7.1 Get-Capabilities

列出映像中的所有按需功能

DISM /Image:"D:\WinPE_amd64\mount" /get-capabilities

系统找不到指定的路径。

DISM /online /get-capabilities |find /c " :"

850 (2*425)

State包含: 已安装; 不存在.

7.2 Get-CapabilityInfo

列出有关特定按需功能的信息

DISM /Image:"D:\WinPE_amd64\mount" /Get-CapabilityInfo /CapabilityName:XPS.Viewer~~~~0.0.1.0

DISM /online /Get-CapabilityInfo /CapabilityName:Print.Management.Console~~~~0.0.1.0

DISM /online /Get-CapabilityInfo /CapabilityName:XPS.Viewer~~~~0.0.1.0

功能标识 : XPS.Viewer~~~~0.0.1.0

名称 : XPS.Viewer

状态 : 不存在

显示名称 : XPS 查看器

描述 : 使你可以读取、复制、打印、签名 XPS 文档以及设置该文档的权限

下载大小 :  0 bytes

安装大小 :  0 bytes

8. 获取应用包(.appx)维护信息

DISM 应用包(.appx 或 .appxbundle)维护命令行选项

可以使用应用包 (.appx) 维护命令列出 Windows 映像中预配的应用。 将为针对 Windows 映像创建的每个用户配置文件注册预配的应用。

8.1 Get-ProvisionedAppxPackages

列出 Windows 映像中预配的应用

Dism /Image:"D:\WinPE_amd64\mount" /Get-ProvisionedAppxPackages

Dism /online /Get-ProvisionedAppxPackages

Dism /online /Get-ProvisionedAppxPackages |find /c " :"

188 (6*31)

9. 获取国际设置和语言

DISM 语言和国际维护命令行选项

9.1 Get-Intl

列出所有国际设置和语言

Dism /Image:"D:\WinPE_amd64\mount" /Get-Intl

若包含发行版: 

Dism /Image:"D:\WinPE_amd64\mount" /distribution:C:\windows_distribution\langpacks /Get-Intl

Dism /online /Get-Intl

a. 获取 Windows 版本信息

 DISM Windows 版本维护命令行选项

a.1 Get-CurrentEdition

显示当前映像的版本。

Dism /online /Get-CurrentEdition

当前版本 : Professional

a.2 Get-TargetEditions

显示可以将映像升级到的Windows 版本列表。

Dism /online /Get-TargetEditions

可以升级的版本: … 

b. 获取应用程序修补程序信息(脱机映像)

DISM 应用程序维护命令行选项

可对脱机映像使用应用程序维护命令行选项,以检查 Microsoft Windows Installer 应用程序修补程序(.msp 文件)的适用性, 以及查询脱机映像以获取有关已安装 Windows Installer 应用程序(.msi 文件)和应用程序修补程序(.msp 文件)的信息。

可以显示有关按修补程序和应用程序筛选的已安装 MSP 修补程序的详细信息。 

  • 如果指定了 /PatchCode 选项,则修补程序应用到的所有 Windows Installer 应用程序的详细信息都会显示。
  • 如果指定了 /ProductCode 选项,则有关指定的应用程序中所有 MSP 修补程序的信息都会显示。
  • 如果指定了 /PatchCode 和 /ProductCode 选项,则只有在该特定修补程序应用于指定的 Windows Installer 应用程序时才显示信息。
  • 如果未指定 /PatchCode 和 /ProductCode 选项,则所有已安装的 Windows Installer 包和 MSP 修补程序都会显示。

b.1 Get-AppPatchInfo(已安装MSP修补程序的信息)

列出有关已安装 MSP 修补程序的信息

Dism /Image:"D:\WinPE_amd64\mount" /Get-AppPatchInfo

Dism /Image:"D:\WinPE_amd64\mount" /Get-AppPatchInfo /PatchCode:{B0B9997C-GUID-GUID-GUID-74D866BBDFFF}

Dism /Image:"D:\WinPE_amd64\mount" /Get-AppPatchInfo /ProductCode:{B0F9497C-GUID-GUID-GUID-74D866BBDF59}

Dism /Image:"D:\WinPE_amd64\mount" /Get-AppPatchInfo /PatchCode:{B0B9997C-GUID-GUID-GUID-74D866BBDFFF} /ProductCode:{B0F9497C-GUID-GUID-GUID-74D866BBDF59}

b.2 Get-AppPatches(已应用于应用程序的MSP修补程序的信息)

列出有关已应用于应用程序的 MSP 修补程序的信息

Dism /online /Check-AppPatch /?

/Check-AppPatch /PatchLocation:<path_to_patch.msp> [/Format:<output_format>]

显示 MSP 修补程序是否适用于脱机映像的信息。

可以指定多个修补程序文件。使用 /Format 选项为输出指定表或列表格式。 如果没有指定 /Format,则输出的格式为列表。

联机映像不支持此命令。

DISM /Image:C:\test\offline /Check-AppPatch  /PatchLocation:C:\AppPatches\patch.msp

Dism /Image:"D:\WinPE_amd64\mount" /Get-AppPatches

Dism /Image:"D:\WinPE_amd64\mount" /Get-AppPatches /ProductCode:{B0F9497C-GUID-GUID-GUID-74D866BBDF59}

b.3 Get-Apps(所有Windows-Installer应用程序(MSI)的信息)

列出有关所有 Windows Installer 应用程序的信息

Dism /Image:"D:\WinPE_amd64\mount" /Get-Apps

b.4 Get-AppInfo(特定Windows-Installer应用程序(MSI)的信息)

列出有关特定 Windows Installer 应用程序的信息

Dism /Image:"D:\WinPE_amd64\mount" /Get-AppInfo /ProductCode:{B0F9497C-GUID-GUID-GUID-74D866BBDF59}

c. 其他Get命令

c.1 Get-WIMBootEntry

显示指定磁盘卷的 WIMBoot 配置项。(WIM 命令)

DISM /Get-WIMBootEntry /Path:C:\ 

错误: 2 系统找不到指定的文件。

c.2 Get-NonRemovableAppPolicy

列出配置为不能通过 企业策略删除的程序包系列。(APPX 服务命令)

dism /Get-NonRemovableAppPolicy /online

No package families in the nonremovable app policy. 操作成功完成。

c.3 Get-ReservedStorageState

获取保留存储空间的当前状态。(程序包服务命令)

dism /Get-ReservedStorageState /online

已启用保留存储空间。

c.4 Get-DefaultAppAssociations

显示 Windows 映像中默认应用程序关联的列表。(默认关联命令)

dism /Get-DefaultAppAssociations /online

<?xml version="1.0" encoding="UTF-8"?> … 

c.5 Get-ProvisioningPackageInfo

获取预配程序包的信息。(预配程序包服务命令)

c.6 Get-OSUninstallWindow

Gets the OS Uninstall Window. (操作系统卸载服务命令)