DISM 保留存储命令行选项

保留存储有可能使用户在无需释放磁盘空间的情况下即可下载和安装 Windows 更新。

从 Windows 10 版本 2004 开始,IT 专业人员可使用以下 DISM 命令按需启用和禁用保留存储。 这包括未随 Windows 10 版本 1903 及更高版本一起提供的设备。

对于直接连接到 Windows 更新 (WU) 的设备,保留存储即开即用。 但是,在使用终结点管理工具(如 Windows Server Update Services 或 Configuration Manager)的 IT 托管设备上,保留存储不会自动工作。 对于这些环境,终结点管理工具可以通过在下载和安装更新之前禁用保留存储,并在更新安装完成后启用保留存储来利用保留存储。

有关详细信息,请参阅保留存储在 Windows 10 中的工作原理

/Set-ReservedStorageState

设置保留存储的状态。 仅支持联机 Windows 映像。

语法

/Set-ReservedStorageState /State:<state>
  • State 可以是 EnabledDisabled

如果正在使用保留存储,则可能不会禁用它,并返回以下错误:

This operation is not supported when reserved storage is in use. Please wait for any servicing operations to complete and then try again later.

对保留存储状态所做的更改反映在 Sysprep 通用化 Windows 映像中。 有关详细信息,请参阅 Sysprep(通用化)Windows 安装

示例:

DISM.exe /Online /Set-ReservedStorageState /State:Enabled
DISM.exe /Online /Set-ReservedStorageState /State:Disabled

/Get-ReservedStorageState

获取保留存储的当前状态。 联机 Windows 映像支持此命令行选项。

示例

DISM.exe /Online /Get-ReservedStorageState