{"content":"<div></div>","rawMetadata":{"metadata":{"_op_canonicalUrlPrefix":"https://learn.microsoft.com/ja-jp/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/06/25","updated_at_date_time":"2026-06-25T23:32:07.9720953Z"},"_path":"module/configurationmanager/new-cmscript.json","_rel":"../../","_tocRel":"../sccm-ps/toc.json","apiPlatform":"powershell","author":"Banreet","breadcrumb_path":"/powershell/sccm/bread/toc.json","canonical_url":"https://learn.microsoft.com/ja-jp/powershell/module/configurationmanager/new-cmscript?view=sccm-ps","content_git_url":"https://github.com/MicrosoftDocs/sccm-docs-powershell-ref/blob/main/sccm-ps/ConfigurationManager/New-CMScript.md","default_moniker":"sccm-ps","depot_name":"MSDN.sccm-powershell","document_id":"28437a50-142a-d893-66ed-6b1016a10e08","document_version_independent_id":"5d3ad092-c912-5253-1bc0-f607ece243f9","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":"2de6091be6fb706d31e84a0c5d3a5b0d07974400","gitcommit":"https://github.com/MicrosoftDocs/sccm-docs-powershell/blob/2de6091be6fb706d31e84a0c5d3a5b0d07974400/sccm-ps/ConfigurationManager/New-CMScript.md","github_contributors":["aczechowski"],"locale":"ja-jp","manager":"laurawi","Module Name":"ConfigurationManager","monikers":["sccm-ps"],"ms.author":"dannygu","ms.date":"12/28/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-CMScript.md","original_content_git_url_template":"{repo}/blob/{branch}/sccm-ps/ConfigurationManager/New-CMScript.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-06-25 11:32 PM","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/new-cmscript","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMScript","schemaType":"PowershellCmdlet","summary":"<p>Configuration Manager で PowerShell スクリプトを作成します。</p>\n","uid":"ConfigurationManager.New-CMScript"}],"ocv-translation-feedback":true},"_xrefmap":{"ConfigurationManager":{"href":"./","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"ConfigurationManager","schemaType":"PowershellModule","uid":"ConfigurationManager"},"ConfigurationManager.New-CMScript":{"href":"new-cmscript","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMScript","schemaType":"PowershellCmdlet","summary":"<p>Configuration Manager で PowerShell スクリプトを作成します。</p>\n","uid":"ConfigurationManager.New-CMScript"}},"description":"<p>このコマンドレットを使用して、新しい PowerShell スクリプトを作成します。 これらのスクリプトは、Configuration Manager で統合および管理されます。</p>\n<p>詳細については、「 <a href=\"/mem/configmgr/apps/deploy-use/create-deploy-scripts\">Configuration Manager コンソールから PowerShell スクリプトを作成して実行する」を参照してください</a>。</p>\n<div class=\"NOTE\">\n<p>注:</p>\n<p>\n              <code>PS XYZ:\\&gt;</code>など、Configuration Manager サイト ドライブから Configuration Manager コマンドレットを実行します。 詳細については、「作業の <a href=\"/powershell/sccm/overview\">開始</a>」を参照してください。</p>\n</div>\n","examples":[{"code":"New-CMScript -ScriptName \"CMScript\" -ScriptText 'Write-Host \"New Script\"'","description":"","summary":"<p>この例では、 <strong>CMScript</strong> という名前の新しいスクリプトを作成します。 スクリプトのテキストを指定します。</p>\n","title":"例 1: テキストを使用してスクリプトを作成する"},{"code":"New-CMScript -ScriptName \"ImportScript\" -ScriptFile \"\\\\abc\\importedscript.ps1\" -Fast","description":"","summary":"<p>この例では、 <strong>ImportScript</strong> という名前の新しいスクリプトを作成します。 ネットワーク共有上の既存のファイルからスクリプトをインポートします。</p>\n","title":"例 2: ファイルからスクリプトを作成する"}],"inputs":[{"description":"","name":"<span class=\"no-loc xref\">None</span>\n"}],"links":[{"href":"approve-cmscript","text":"Approve-CMScript"},{"href":"deny-cmscript","text":"Deny-CMScript"},{"href":"get-cmscript","text":"Get-CMScript"},{"href":"invoke-cmscript","text":"Invoke-CMScript"},{"href":"remove-cmscript","text":"Remove-CMScript"},{"href":"set-cmscript","text":"Set-CMScript"},{"href":"/mem/configmgr/apps/deploy-use/create-deploy-scripts","text":"Configuration Manager コンソールから PowerShell スクリプトを作成して実行する"}],"module":"ConfigurationManager","name":"New-CMScript","notes":"","outputs":[{"description":"","name":"<span class=\"no-loc xref\">System.Object</span>\n"}],"parameters":[{"aliases":"cf","defaultValue":"None","description":"<p>コマンドレットを実行する前に確認メッセージを表示します。</p>\n","name":"Confirm","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>このパラメーターは、ワイルドカード文字をリテラル文字の値として扱います。 \n              <strong>ForceWildcardHandling</strong> と組み合わせることはできません。</p>\n","name":"DisableWildcardHandling","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>このパラメーターを追加して、遅延プロパティを自動的に更新しないようにします。 遅延プロパティには、取得するのが比較的非効率的な値が含まれています。 これらのプロパティを取得すると、追加のネットワーク トラフィックが発生し、コマンドレットのパフォーマンスが低下する可能性があります。</p>\n<p>このパラメーターを使用しない場合、コマンドレットに警告が表示されます。 この警告を無効にするには、 <code>$CMPSSuppressFastNotUsedCheck = $true</code>を設定します。</p>\n","name":"Fast","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>このパラメーターはワイルドカード文字を処理し、予期しない動作が発生する可能性があります (推奨されません)。 \n              <strong>DisableWildcardHandling</strong> と組み合わせることはできません。</p>\n","name":"ForceWildcardHandling","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>PowerShell スクリプト ファイルへのパスを指定します (<code>.ps1</code>)。 ファイルのテキストは、Configuration Manager のスクリプトに使用されます。</p>\n","isRequired":true,"name":"ScriptFile","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>作成するスクリプトの名前を指定します。</p>\n","isRequired":true,"name":"ScriptName","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>作成するスクリプトのテキストを指定します。</p>\n","isRequired":true,"name":"ScriptText","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"wi","defaultValue":"None","description":"<p>コマンドレットが実行されるとどうなるかを示します。 コマンドレットは実行されません。</p>\n","name":"WhatIf","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"}],"schema":"PowershellCmdlet","summary":"<p>Configuration Manager で PowerShell スクリプトを作成します。</p>\n","syntaxes":["New-CMScript [-Fast] -ScriptFile <String> -ScriptName <String> [-DisableWildcardHandling]\n [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]","New-CMScript [-Fast] -ScriptName <String> -ScriptText <String> [-DisableWildcardHandling]\n [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]"],"uid":"ConfigurationManager.New-CMScript","hideEdit":true,"ms.translationtype":"MT","ms.contentlocale":"ja-jp","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-CMScript.md","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/new-cmscript","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMScript","schemaType":"PowershellCmdlet","summary":"<p>Configuration Manager で PowerShell スクリプトを作成します。</p>\n","uid":"ConfigurationManager.New-CMScript"}],"canonical_url":"https://learn.microsoft.com/ja-jp/powershell/module/configurationmanager/new-cmscript?view=sccm-ps","_op_canonicalUrl":"https://learn.microsoft.com/ja-jp/powershell/module/configurationmanager/new-cmscript?view=sccm-ps"},"pageMetadata":"<meta name=\"description\" content=\"<p>このコマンドレットを使用して、新しい PowerShell スクリプトを作成します。 これらのスクリプトは、Configuration Manager で統合および管理されます。</p>\n<p>詳細については、「 <a href=&quot;/mem/configmgr/apps/deploy-use/create-deploy-scripts&quot;>Configuration Manager コンソールから PowerShell スクリプトを作成して実行する」を参照してください</a>。</p>\n<div class=&quot;NOTE&quot;>\n<p>注:</p>\n<p>\n              <code>PS XYZ:\\&amp;gt;</code>など、Configuration Manager サイト ドライブから Configuration Manager コマンドレットを実行します。 詳細については、「作業の <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-CMScript.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=\"ja-jp\" />\r\n<meta name=\"ms.translationtype\" content=\"MT\" />\r\n<meta name=\"name\" content=\"New-CMScript\" />\r\n<meta name=\"notes\" content=\"\" />\r\n<meta name=\"schema\" content=\"PowershellCmdlet\" />\r\n<meta name=\"summary\" content=\"<p>Configuration Manager で PowerShell スクリプトを作成します。</p>\n\" />\r\n<meta name=\"syntaxes\" content=\"New-CMScript [-Fast] -ScriptFile <String> -ScriptName <String> [-DisableWildcardHandling]\n [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]\" />\r\n<meta name=\"syntaxes\" content=\"New-CMScript [-Fast] -ScriptName <String> -ScriptText <String> [-DisableWildcardHandling]\n [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]\" />\r\n<meta name=\"uid\" content=\"ConfigurationManager.New-CMScript\" />\r\n","themesRelativePathToOutputRoot":"_themes/"}