{"content":"<div></div>","rawMetadata":{"metadata":{"_op_canonicalUrlPrefix":"https://learn.microsoft.com/zh-tw/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"},{"display_name":"Dan Mabee","id":"40476441","name":"damabe","profile_url":"https://github.com/damabe"},{"display_name":"Chris Kibble","id":"39386226","name":"ChrisKibble","profile_url":"https://github.com/ChrisKibble"},{"display_name":"sankethka","id":"16908144","name":"sankethka","profile_url":"https://github.com/sankethka"}],"update_at":"2026/8/3","updated_at_date_time":"2026-08-03T08:29:02.1409245Z"},"_path":"module/configurationmanager/new-cmtsstepsetupwindowsandconfigmgr.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-tw/powershell/module/configurationmanager/new-cmtsstepsetupwindowsandconfigmgr?view=sccm-ps","content_git_url":"https://github.com/MicrosoftDocs/sccm-docs-powershell-ref/blob/main/sccm-ps/ConfigurationManager/New-CMTSStepSetupWindowsAndConfigMgr.md","default_moniker":"sccm-ps","depot_name":"MSDN.sccm-powershell","document_id":"6293b856-2fe5-fc96-3c60-f68df1b9d795","document_version_independent_id":"a4365ca5-af67-0f6d-0ad9-8d7994f8ed9a","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-CMTSStepSetupWindowsAndConfigMgr.md","github_contributors":["aczechowski","damabe","ChrisKibble","sankethka"],"locale":"zh-tw","manager":"laurawi","Module Name":"ConfigurationManager","monikers":["sccm-ps"],"ms.author":"dannygu","ms.date":"09/01/2021","ms.service":"microsoft-endpoint-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-CMTSStepSetupWindowsAndConfigMgr.md","original_content_git_url_template":"{repo}/blob/{branch}/sccm-ps/ConfigurationManager/New-CMTSStepSetupWindowsAndConfigMgr.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-08-03 08:29 AM","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/new-cmtsstepsetupwindowsandconfigmgr","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMTSStepSetupWindowsAndConfigMgr","schemaType":"PowershellCmdlet","summary":"<p>建立 <strong>安裝 Windows 和 ConfigMgr</strong> 步驟，您可以將其新增至工作順序。</p>\n","uid":"ConfigurationManager.New-CMTSStepSetupWindowsAndConfigMgr"}],"ocv-translation-feedback":true},"_xrefmap":{"ConfigurationManager":{"href":"./","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"ConfigurationManager","schemaType":"PowershellModule","uid":"ConfigurationManager"},"ConfigurationManager.New-CMTSStepSetupWindowsAndConfigMgr":{"href":"new-cmtsstepsetupwindowsandconfigmgr","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMTSStepSetupWindowsAndConfigMgr","schemaType":"PowershellCmdlet","summary":"<p>建立 <strong>安裝 Windows 和 ConfigMgr</strong> 步驟，您可以將其新增至工作順序。</p>\n","uid":"ConfigurationManager.New-CMTSStepSetupWindowsAndConfigMgr"}},"description":"<p>此 Cmdlet 會建立新的 <strong>安裝 Windows 和 ConfigMgr</strong> 步驟物件。 然後使用 <a href=\"add-cmtasksequencestep\">Add-CMTaskSequenceStep</a> Cmdlet 將步驟新增至工作順序。 如需此步驟的詳細資訊，請 <a href=\"/mem/configmgr/osd/understand/task-sequence-steps#BKMK_SetupWindowsandConfigMgr\">參閱關於工作順序步驟：設定 Windows 和 ConfigMgr</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":"$step = New-CMTSStepSetupWindowsAndConfigMgr -Name \"Setup Windows and ConfigMgr\" -PackageId \"XYZ0002\"\n\n$tsNameOsd = \"Default OS deployment\"\n$tsOsd = Get-CMTaskSequence -Name $tsNameOsd -Fast\n\n$tsOsd | Add-CMTaskSequenceStep -Step $step -InsertStepStartIndex 11","description":"","summary":"<p>此範例會先使用標識碼為 XYZ0002 的套件，建立安裝 <strong>Windows 和 ConfigMgr</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-cmtsstepsetupwindowsandconfigmgr","text":"Get-CMTSStepSetupWindowsAndConfigMgr"},{"href":"remove-cmtsstepsetupwindowsandconfigmgr","text":"Remove-CMTSStepSetupWindowsAndConfigMgr"},{"href":"set-cmtsstepsetupwindowsandconfigmgr","text":"Set-CMTSStepSetupWindowsAndConfigMgr"},{"href":"/mem/configmgr/osd/understand/task-sequence-steps#BKMK_SetupWindowsandConfigMgr","text":"關於工作順序步驟：設定 Windows 和 ConfigMgr"}],"module":"ConfigurationManager","name":"New-CMTSStepSetupWindowsAndConfigMgr","notes":"<p>如需此傳回物件及其屬性的詳細資訊，請 <a href=\"/mem/configmgr/develop/reference/osd/sms_tasksequence_setupwindowsandsmsaction-server-wmi-class\">參閱SMS_TaskSequence_SetupWindowsAndSMSAction伺服器 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<p>具體來說，在此步驟中，如果發生錯誤，無論是否啟用此設定，工作順序會失敗。</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":"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":"InstallationProperties","defaultValue":"None","description":"<p>工作順序步驟會自動指定月臺指派和預設組態。 使用此參數來指定安裝用戶端時要使用的任何其他安裝屬性。 若要輸入多個安裝屬性，請以空格分隔它們。</p>\n","name":"InstallationProperty","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</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":"ClientPackageId","defaultValue":"None","description":"<p>指定要與此步驟搭配使用的 Configuration Manager 用戶端安裝套件套件 <strong>識別</strong> 碼。 此值是標準套件識別碼，例如 <code>XYZ0002</code>。</p>\n","isRequired":true,"name":"PackageId","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"PreproductionClientPackageId","defaultValue":"None","description":"<p>指定要與此步驟搭配使用之生產前用戶端安裝套件的 <strong>套件識別</strong> 碼。</p>\n<p>如果有生產前用戶端套件可用，且計算機是試驗集合的成員，工作順序會使用此套件，而不是生產用戶端套件。 生產前用戶端是在生產環境中進行測試的較新版本。</p>\n","name":"PreproductionPackageId","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"}],"schema":"PowershellCmdlet","summary":"<p>建立 <strong>安裝 Windows 和 ConfigMgr</strong> 步驟，您可以將其新增至工作順序。</p>\n","syntaxes":["New-CMTSStepSetupWindowsAndConfigMgr [-InstallationProperty <String>] -PackageId <String>\n [-PreproductionPackageId <String>] [-Condition <IResultObject[]>] [-ContinueOnError] [-Description <String>]\n [-Disable] -Name <String> [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm]\n [<CommonParameters>]"],"uid":"ConfigurationManager.New-CMTSStepSetupWindowsAndConfigMgr","hideEdit":true,"ms.translationtype":"MT","ms.contentlocale":"zh-tw","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-CMTSStepSetupWindowsAndConfigMgr.md","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/new-cmtsstepsetupwindowsandconfigmgr","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMTSStepSetupWindowsAndConfigMgr","schemaType":"PowershellCmdlet","summary":"<p>建立 <strong>安裝 Windows 和 ConfigMgr</strong> 步驟，您可以將其新增至工作順序。</p>\n","uid":"ConfigurationManager.New-CMTSStepSetupWindowsAndConfigMgr"}],"canonical_url":"https://learn.microsoft.com/zh-tw/powershell/module/configurationmanager/new-cmtsstepsetupwindowsandconfigmgr?view=sccm-ps","_op_canonicalUrl":"https://learn.microsoft.com/zh-tw/powershell/module/configurationmanager/new-cmtsstepsetupwindowsandconfigmgr?view=sccm-ps"},"pageMetadata":"<meta name=\"description\" content=\"<p>此 Cmdlet 會建立新的 <strong>安裝 Windows 和 ConfigMgr</strong> 步驟物件。 然後使用 <a href=&quot;add-cmtasksequencestep&quot;>Add-CMTaskSequenceStep</a> Cmdlet 將步驟新增至工作順序。 如需此步驟的詳細資訊，請 <a href=&quot;/mem/configmgr/osd/understand/task-sequence-steps#BKMK_SetupWindowsandConfigMgr&quot;>參閱關於工作順序步驟：設定 Windows 和 ConfigMgr</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-CMTSStepSetupWindowsAndConfigMgr.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-tw\" />\r\n<meta name=\"ms.translationtype\" content=\"MT\" />\r\n<meta name=\"name\" content=\"New-CMTSStepSetupWindowsAndConfigMgr\" />\r\n<meta name=\"notes\" content=\"<p>如需此傳回物件及其屬性的詳細資訊，請 <a href=&quot;/mem/configmgr/develop/reference/osd/sms_tasksequence_setupwindowsandsmsaction-server-wmi-class&quot;>參閱SMS_TaskSequence_SetupWindowsAndSMSAction伺服器 WMI 類別</a>。</p>\n\" />\r\n<meta name=\"schema\" content=\"PowershellCmdlet\" />\r\n<meta name=\"summary\" content=\"<p>建立 <strong>安裝 Windows 和 ConfigMgr</strong> 步驟，您可以將其新增至工作順序。</p>\n\" />\r\n<meta name=\"syntaxes\" content=\"New-CMTSStepSetupWindowsAndConfigMgr [-InstallationProperty <String>] -PackageId <String>\n [-PreproductionPackageId <String>] [-Condition <IResultObject[]>] [-ContinueOnError] [-Description <String>]\n [-Disable] -Name <String> [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm]\n [<CommonParameters>]\" />\r\n<meta name=\"uid\" content=\"ConfigurationManager.New-CMTSStepSetupWindowsAndConfigMgr\" />\r\n","themesRelativePathToOutputRoot":"_themes/"}