Windows 配置设计器命令行接口(参考)Windows Configuration Designer command-line interface (reference)

适用于Applies to

  • Windows 10Windows 10
  • Windows 10 移动版Windows 10 Mobile

可以使用 Windows 配置设计器命令行接口 (CLI) 自动生成预配包。You can use the Windows Configuration Designer command-line interface (CLI) to automate the building of provisioning packages.

  • IT 专业人员可以使用 Windows 配置设计器 CLI 减少现有进程的重组。IT pros can use the Windows Configuration Designer CLI to require less re-tooling of existing processes. 你必须使用管理员权限在命令窗口中运行 Windows 配置设计器 CLI。You must run the Windows Configuration Designer CLI from a command window with administrator privileges.

  • 你必须使用 Windows 配置设计器 CLI 并编辑 customizations.xml 源才能创建具有多变量支持的预配包。You must use the Windows Configuration Designer CLI and edit the customizations.xml sources to create a provisioning package with multivariant support. 你需要将 customizations.xml 文件作为 Windows 配置设计器 CLI 的其中一项输入,才能构建预配包。You need the customizations.xml file as one of the inputs to the Windows Configuration Designer CLI to build a provisioning package. 有关详细信息,请参阅创建包含多变量设置的预配包For more information, see Create a provisioning package with multivariant settings.


icd.exe /Build-ProvisioningPackage /CustomizationXML:<path_to_xml> /PackagePath:<path_to_ppkg> 
[/StoreFile:<path_to_storefile>]  [/MSPackageRoot:<path_to_mspackage_directory>]  [/OEMInputXML:<path_to_xml>]
[/ProductName:<product_name>]  [/Variables:<name>:<value>] [[+|-]Encrypted] [[+|-]Overwrite] [/?]

开关和参数Switches and arguments

SwitchSwitch Required?Required? ArgumentsArguments
/CustomizationXML/CustomizationXML NoNo 指定到 Windows 预配 XML 文件的路径,其中包含自定义资源和设置。Specifies the path to a Windows provisioning XML file that contains the customization assets and settings. 有关详细信息,请参阅 Windows 预配应答文件。For more information, see Windows provisioning answer file.
/PackagePath/PackagePath YesYes 指定保存生成的预配包文件的路径和程序包名称。Specifies the path and the package name where the built provisioning package will be saved.
/StoreFile/StoreFile NoNo

请参阅重要说明。See Important note.
对于使用设置存储而非 Windows 配置设计器使用的默认存储的合作伙伴,请使用此参数指定到一个或多个以逗号分隔的 Windows 设置存储文件的路径。For partners using a settings store other than the default store(s) used by Windows Configuration Designer, use this parameter to specify the path to one or more comma-separated Windows settings store file. 默认情况下,如果你不指定设置存储文件,则将由 Windows 配置设计器加载所有 Windows 版本都通用的设置存储。By default, if you don't specify a settings store file, the settings store that's common to all Windows editions will be loaded by Windows Configuration Designer.

重要提示 如果你使用此参数,切勿使用 /MSPackageRoot 或 /OEMInputXML。Important If you use this parameter, you must not use /MSPackageRoot or /OEMInputXML.
/Variables/Variables NoNo 指定以分号分隔的 <name><value> 宏对。Specifies a semicolon separated <name> and <value> macro pair. 参数格式必须为 <name>=<value>The format for the argument must be <name>=<value>.
EncryptedEncrypted NoNo 表示是否应对生成的预配包加密。Denotes whether the provisioning package should be built with encryption. Windows 配置设计器会自动生成解密密码,并在输出中包括此信息。Windows Configuration Designer auto-generates the decryption password and includes this information in the output.

在之前加上 + 表示加密, - 表示不加密。Precede with + for encryption or - for no encryption. 默认为不加密。The default is no encryption.
OverwriteOverwrite NoNo 表示是否要覆盖现有预配包。Denotes whether to overwrite an existing provisioning package.

在之前加上 + 表示覆盖现有包,如果不想覆盖现有包,则加上 - 。Precede with + to overwrite an existing package or - if you don't want to overwrite an existing package. 默认值为 false(不覆盖)。The default is false (don't overwrite).
/?/? NoNo 列出命令行工具或特定命令的开关及其描述。Lists the switches and their descriptions for the command-line tool or for certain commands.