{"content":"<div></div>","rawMetadata":{"metadata":{"_op_canonicalUrlPrefix":"https://learn.microsoft.com/zh-cn/powershell/","_op_gitContributorInformation":{"author":{"display_name":"Banreet Kaur","id":"92906285","name":"Banreet","profile_url":"https://github.com/Banreet"},"contributors":[{"display_name":"Aaron Czechowski","id":"26784733","name":"aczechowski","profile_url":"https://github.com/aczechowski"}],"update_at":"2026/9/1","updated_at_date_time":"2026-09-01T12:18:34.0521957Z"},"_path":"module/configurationmanager/new-cmtsstepapplydataimage.json","_rel":"../../","_tocRel":"../sccm-ps/toc.json","apiPlatform":"powershell","author":"Banreet","breadcrumb_path":"/powershell/sccm/bread/toc.json","canonical_url":"https://learn.microsoft.com/zh-cn/powershell/module/configurationmanager/new-cmtsstepapplydataimage?view=sccm-ps","content_git_url":"https://github.com/MicrosoftDocs/sccm-docs-powershell-ref/blob/main/sccm-ps/ConfigurationManager/New-CMTSStepApplyDataImage.md","default_moniker":"sccm-ps","depot_name":"MSDN.sccm-powershell","external help file":"AdminUI.PS.dll-Help.xml","feedback_product_url":"https://feedbackportal.microsoft.com/feedback/forum/4669adfc-ee1b-ec11-b6e7-0022481f8472","feedback_system":"Standard","git_commit_id":"48cf632fb4b9ad92060012681a500478254de750","gitcommit":"https://github.com/MicrosoftDocs/sccm-docs-powershell/blob/48cf632fb4b9ad92060012681a500478254de750/sccm-ps/ConfigurationManager/New-CMTSStepApplyDataImage.md","github_contributors":["aczechowski"],"locale":"zh-cn","manager":"laurawi","Module Name":"ConfigurationManager","monikers":["sccm-ps"],"ms.author":"dannygu","ms.date":"08/04/2021","ms.service":"configuration-manager","ms.subservice":"other","ms.topic":"reference","online version":"","open_to_public_contributors":true,"original_content_git_url":"https://github.com/MicrosoftDocs/sccm-docs-powershell/blob/live/sccm-ps/ConfigurationManager/New-CMTSStepApplyDataImage.md","original_content_git_url_template":"{repo}/blob/{branch}/sccm-ps/ConfigurationManager/New-CMTSStepApplyDataImage.md","PlatyPS schema version":"2.0.0","products":["https://authoring-docs-microsoft.poolparty.biz/devrel/f1499c3b-793f-48c3-a9ce-20285bcc6541"],"site_name":"Docs","titleSuffix":"Configuration Manager","uhfHeaderId":"MSDocsHeader-Powershell","updated_at":"2026-09-01 12:18 PM","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/new-cmtsstepapplydataimage","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMTSStepApplyDataImage","schemaType":"PowershellCmdlet","summary":"<p>创建可添加到任务序列 <strong>的“应用数据映像</strong> ”步骤。</p>\n","uid":"ConfigurationManager.New-CMTSStepApplyDataImage"}],"ocv-translation-feedback":true},"_xrefmap":{"ConfigurationManager":{"href":"./","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"ConfigurationManager","schemaType":"PowershellModule","uid":"ConfigurationManager"},"ConfigurationManager.New-CMTSStepApplyDataImage":{"href":"new-cmtsstepapplydataimage","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMTSStepApplyDataImage","schemaType":"PowershellCmdlet","summary":"<p>创建可添加到任务序列 <strong>的“应用数据映像</strong> ”步骤。</p>\n","uid":"ConfigurationManager.New-CMTSStepApplyDataImage"}},"description":"<p>此 cmdlet 将创建新的 <strong>“应用数据映像”</strong> 步骤对象。 然后使用 <a href=\"add-cmtasksequencestep\">Add-CMTaskSequenceStep</a> cmdlet 将步骤添加到任务序列。 有关此步骤的详细信息，请参阅 <a href=\"/mem/configmgr/osd/understand/task-sequence-steps#BKMK_ApplyDataImage\">关于任务序列步骤：应用数据映像</a>。</p>\n<div class=\"NOTE\">\n<p>注意</p>\n<p>从 Configuration Manager 站点驱动器运行 Configuration Manager cmdlet，例如 <code>PS XYZ:\\&gt;</code>。 有关详细信息，请参阅 <a href=\"/powershell/sccm/overview\">入门</a>。</p>\n</div>\n","examples":[{"code":"$pkgDataImg = Get-CMOperatingSystemImage -Name \"Data image\"\n$step = New-CMTSStepApplyDataImage -Name \"Apply data image\" -ImagePackage $pkgDataImg -ImagePackageIndex 1\n\n$tsName = \"Custom task sequence\"\n$ts = Get-CMTaskSequence -Name $tsName -Fast\n\n$ts | Add-CMTaskSequenceStep -Step $step -InsertStepStartIndex 11","description":"","summary":"<p>此示例首先使用 <strong>Get-CMOperatingSystemImage</strong> cmdlet 获取数据映像包的对象。 它将此对象保存在 <strong>$pkgDataImg</strong> 变量中。 下一步使用 <strong>$pkgDataImg</strong> 对象作为映像包，为<strong>“应用数据映像</strong>”步骤创建对象。</p>\n<p>然后，它获取任务序列对象，并将此新步骤添加到索引 11 处的任务序列。</p>\n","title":"示例 1"}],"inputs":[{"description":"","name":"<span class=\"no-loc xref\">None</span>\n"}],"links":[{"href":"get-cmtsstepapplydataimage","text":"Get-CMTSStepApplyDataImage"},{"href":"remove-cmtsstepapplydataimage","text":"Remove-CMTSStepApplyDataImage"},{"href":"set-cmtsstepapplydataimage","text":"Set-CMTSStepApplyDataImage"},{"href":"/mem/configmgr/osd/understand/task-sequence-steps#BKMK_ApplyDataImage","text":"关于任务序列步骤：应用数据图像"}],"module":"ConfigurationManager","name":"New-CMTSStepApplyDataImage","notes":"<p>有关此返回对象及其属性的详细信息，请参阅 <a href=\"/mem/configmgr/develop/reference/osd/sms_tasksequence_applydataimageaction-server-wmi-class\">SMS_TaskSequence_ApplyDataImageAction服务器 WMI 类</a>。</p>\n","outputs":[{"description":"","name":"<span class=\"no-loc xref\">IResultObject</span>\n"}],"parameters":[{"aliases":"Conditions","defaultValue":"None","description":"<p>指定要用于此步骤的条件对象。 若要获取此对象，请使用任务序列条件 cmdlet 之一。 例如 <a href=\"get-cmtsstepconditionvariable\">Get-CMTSStepConditionVariable</a>。</p>\n","name":"Condition","parameterValueGroup":"","position":"Named","type":"<p><span class=\"no-loc xref\">IResultObject</span><span>[</span><span>]</span></p>\n"},{"aliases":"cf","defaultValue":"None","description":"<p>提示你在运行 cmdlet 之前进行确认。</p>\n","name":"Confirm","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>添加此参数以启用步骤选项“ <strong>出错时继续</strong>”。 启用此选项时，如果步骤失败，任务序列将继续。</p>\n","name":"ContinueOnError","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>为此任务序列步骤指定可选说明。</p>\n","name":"Description","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>指定要应用此数据图像的位置。 如果未指定此参数，则默认值为 <code>NextAvailableFormattedPartition</code>。</p>\n<ul>\n<li><p>\n              <code>NextAvailableFormattedPartition</code>：使用此任务序列中的 <strong>“应用操作系统”</strong> 或 <strong>“应用数据映像</strong> ”步骤尚未面向的下一个顺序分区。</p>\n</li>\n<li><p>\n              <code>SpecificDiskAndPartition</code>：使用 <strong>DestinationDisk</strong> 参数指定磁盘编号，使用 <strong>DestinationPartition</strong> 参数指定分区号。</p>\n</li>\n<li><p>\n              <code>SpecificLogicalDriverLetter</code>：使用 <strong>DestinationDriveLetter</strong> 参数指定由 Windows PE 分配给分区的逻辑驱动器号。 此驱动器号可以不同于新部署的 OS 分配的驱动器号。</p>\n</li>\n<li><p>\n              <code>LogicalDriverLetterInVariable</code>：使用 <strong>DestinationVariable</strong> 参数指定包含 Windows PE 分配给分区的驱动器号的任务序列变量。 此变量通常使用 <a href=\"set-cmtssteppartitiondisk\">Set-CMTSStepPartitionDisk</a> 或 <a href=\"new-cmtssteppartitiondisk\">New-CMTSStepPartitionDisk</a> cmdlet 的 <strong>DiskNumberVariable</strong> 参数设置<strong>，用于格式化和分区磁盘</strong>任务序列步骤。</p>\n</li>\n</ul>\n","name":"Destination","parameterValueGroup":"NextAvailableFormattedPartition, SpecificDiskAndPartition, SpecificLogicalDriverLetter, LogicalDriverLetterInVariable","position":"Named","type":"<span class=\"no-loc xref\">DestinationType</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>使用 <code>-Destination SpecificDiskAndPartition</code>时，使用此参数指定磁盘编号。 指定从 <code>0</code> 到 的 <code>99</code>整数。 另请使用 <strong>DestinationPartition</strong> 参数。</p>\n","name":"DestinationDisk","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">Int32</span>\n"},{"aliases":"DestinationLogicalDrive","defaultValue":"None","description":"<p>使用 <code>-Destination SpecificLogicalDriverLetter</code>时，请使用此参数指定逻辑驱动器号。 指定从 <code>C</code> 到 <code>Z</code>的驱动器号。</p>\n","name":"DestinationDriveLetter","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>使用 <code>-Destination SpecificDiskAndPartition</code>时，请使用此参数指定分区号。 指定从 <code>1</code> 到 的 <code>99</code>整数。 另请使用 <strong>DestinationDisk</strong> 参数。</p>\n","name":"DestinationPartition","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">Int32</span>\n"},{"aliases":"DestinationVariableName","defaultValue":"None","description":"<p>使用 <code>-Destination LogicalDriverLetterInVariable</code>时，使用此参数使用逻辑驱动器号指定任务序列变量。 变量名称需要不带空格且少于 256 个字符的字母数字。</p>\n","name":"DestinationVariable","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"DisableThisStep","defaultValue":"None","description":"<p>添加此参数以禁用此任务序列步骤。</p>\n","name":"Disable","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>此参数将通配符视为文本字符值。 不能将其与 <strong>ForceWildcardHandling</strong> 组合使用。</p>\n","name":"DisableWildcardHandling","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>此参数处理通配符，并可能导致意外行为， (不建议) 。 不能将其与 <strong>DisableWildcardHandling</strong> 组合使用。</p>\n","name":"ForceWildcardHandling","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>指定数据图像包对象。 此步骤应用此图像中的数据。 使用 <strong>ImagePackageIndex</strong> 参数设置图像索引。</p>\n<p>若要获取此对象，请使用 <a href=\"get-cmoperatingsystemimage\">Get-CMOperatingSystemImage</a> cmdlet。</p>\n","isRequired":true,"name":"ImagePackage","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">IResultObject</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>指定图像索引的整数值。 将此参数与 <strong>ImagePackage</strong> 参数一起使用。</p>\n","isRequired":true,"name":"ImagePackageIndex","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">Int32</span>\n"},{"aliases":"StepName","defaultValue":"None","description":"<p>指定此步骤的名称，以便在任务序列中标识它。</p>\n","isRequired":true,"name":"Name","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"wi","defaultValue":"None","description":"<p>显示在 cmdlet 运行时发生的情况。 cmdlet 不会运行。</p>\n","name":"WhatIf","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"WipePartitionBeforeApplyImage","defaultValue":"None","description":"<p>默认情况下启用此设置，这会在应用映像之前删除分区上的所有内容。</p>\n<p>将此参数设置为 <code>$false</code> 不删除分区的先前内容。 此操作可用于将更多内容应用于以前的目标分区。</p>\n","name":"WipePartition","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">Boolean</span>\n"}],"schema":"PowershellCmdlet","summary":"<p>创建可添加到任务序列 <strong>的“应用数据映像</strong> ”步骤。</p>\n","syntaxes":["New-CMTSStepApplyDataImage [-Destination <DestinationType>] [-DestinationDisk <Int32>]\n [-DestinationDriveLetter <String>] [-DestinationPartition <Int32>] [-DestinationVariable <String>]\n -ImagePackage <IResultObject> -ImagePackageIndex <Int32> [-WipePartition <Boolean>]\n [-Condition <IResultObject[]>] [-ContinueOnError] [-Description <String>] [-Disable] -Name <String>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]"],"uid":"ConfigurationManager.New-CMTSStepApplyDataImage","hideEdit":true,"ms.translationtype":"MT","ms.contentlocale":"zh-cn","loc_version":"2024-08-21T21:18:36.7205003Z","loc_source_id":"Github-72476255#live","loc_file_id":"Github-72476255.live.MSDN.sccm-powershell.sccm-ps/ConfigurationManager/New-CMTSStepApplyDataImage.md","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/new-cmtsstepapplydataimage","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMTSStepApplyDataImage","schemaType":"PowershellCmdlet","summary":"<p>创建可添加到任务序列 <strong>的“应用数据映像</strong> ”步骤。</p>\n","uid":"ConfigurationManager.New-CMTSStepApplyDataImage"}],"canonical_url":"https://learn.microsoft.com/zh-cn/powershell/module/configurationmanager/new-cmtsstepapplydataimage?view=sccm-ps","_op_canonicalUrl":"https://learn.microsoft.com/zh-cn/powershell/module/configurationmanager/new-cmtsstepapplydataimage?view=sccm-ps"},"pageMetadata":"<meta name=\"description\" content=\"<p>此 cmdlet 将创建新的 <strong>“应用数据映像”</strong> 步骤对象。 然后使用 <a href=&quot;add-cmtasksequencestep&quot;>Add-CMTaskSequenceStep</a> cmdlet 将步骤添加到任务序列。 有关此步骤的详细信息，请参阅 <a href=&quot;/mem/configmgr/osd/understand/task-sequence-steps#BKMK_ApplyDataImage&quot;>关于任务序列步骤：应用数据映像</a>。</p>\n<div class=&quot;NOTE&quot;>\n<p>注意</p>\n<p>从 Configuration Manager 站点驱动器运行 Configuration Manager cmdlet，例如 <code>PS XYZ:\\&amp;gt;</code>。 有关详细信息，请参阅 <a href=&quot;/powershell/sccm/overview&quot;>入门</a>。</p>\n</div>\n\" />\r\n<meta name=\"hideEdit\" content=\"true\" />\r\n<meta name=\"loc_file_id\" content=\"Github-72476255.live.MSDN.sccm-powershell.sccm-ps/ConfigurationManager/New-CMTSStepApplyDataImage.md\" />\r\n<meta name=\"loc_source_id\" content=\"Github-72476255#live\" />\r\n<meta name=\"loc_version\" content=\"2024-08-21T21:18:36.7205003Z\" />\r\n<meta name=\"module\" content=\"ConfigurationManager\" />\r\n<meta name=\"ms.contentlocale\" content=\"zh-cn\" />\r\n<meta name=\"ms.translationtype\" content=\"MT\" />\r\n<meta name=\"name\" content=\"New-CMTSStepApplyDataImage\" />\r\n<meta name=\"notes\" content=\"<p>有关此返回对象及其属性的详细信息，请参阅 <a href=&quot;/mem/configmgr/develop/reference/osd/sms_tasksequence_applydataimageaction-server-wmi-class&quot;>SMS_TaskSequence_ApplyDataImageAction服务器 WMI 类</a>。</p>\n\" />\r\n<meta name=\"schema\" content=\"PowershellCmdlet\" />\r\n<meta name=\"summary\" content=\"<p>创建可添加到任务序列 <strong>的“应用数据映像</strong> ”步骤。</p>\n\" />\r\n<meta name=\"syntaxes\" content=\"New-CMTSStepApplyDataImage [-Destination <DestinationType>] [-DestinationDisk <Int32>]\n [-DestinationDriveLetter <String>] [-DestinationPartition <Int32>] [-DestinationVariable <String>]\n -ImagePackage <IResultObject> -ImagePackageIndex <Int32> [-WipePartition <Boolean>]\n [-Condition <IResultObject[]>] [-ContinueOnError] [-Description <String>] [-Disable] -Name <String>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]\" />\r\n<meta name=\"uid\" content=\"ConfigurationManager.New-CMTSStepApplyDataImage\" />\r\n","themesRelativePathToOutputRoot":"_themes/"}