{"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"},{"display_name":"Glenn Toms","id":"10454394","name":"GlennToms","profile_url":"https://github.com/GlennToms"},{"display_name":"Dan Mabee","id":"40476441","name":"damabe","profile_url":"https://github.com/damabe"},{"display_name":"sankethka","id":"16908144","name":"sankethka","profile_url":"https://github.com/sankethka"}],"update_at":"2026/06/25","updated_at_date_time":"2026-06-25T23:23:59.828911Z"},"_path":"module/configurationmanager/new-cmdetectionclausefile.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-cmdetectionclausefile?view=sccm-ps","content_git_url":"https://github.com/MicrosoftDocs/sccm-docs-powershell-ref/blob/main/sccm-ps/ConfigurationManager/New-CMDetectionClauseFile.md","default_moniker":"sccm-ps","depot_name":"MSDN.sccm-powershell","description":"ファイルの検出方法句を作成します。","document_id":"ca880bf9-b25f-d12e-73da-e37aa2a995d3","document_version_independent_id":"522d12b7-b2b0-fa84-e479-49fe6e35f150","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":"c74b3f4574af7a8a480adb998b311f6eeeb3e856","gitcommit":"https://github.com/MicrosoftDocs/sccm-docs-powershell/blob/c74b3f4574af7a8a480adb998b311f6eeeb3e856/sccm-ps/ConfigurationManager/New-CMDetectionClauseFile.md","github_contributors":["aczechowski","GlennToms","damabe","sankethka"],"locale":"ja-jp","manager":"laurawi","Module Name":"ConfigurationManager","monikers":["sccm-ps"],"ms.author":"dannygu","ms.date":"12/30/2020","ms.service":"configuration-manager","ms.subservice":"other","ms.topic":"reference","open_to_public_contributors":true,"original_content_git_url":"https://github.com/MicrosoftDocs/sccm-docs-powershell/blob/live/sccm-ps/ConfigurationManager/New-CMDetectionClauseFile.md","original_content_git_url_template":"{repo}/blob/{branch}/sccm-ps/ConfigurationManager/New-CMDetectionClauseFile.md","PlatyPS schema version":"2.0.0","products":["https://authoring-docs-microsoft.poolparty.biz/devrel/f1499c3b-793f-48c3-a9ce-20285bcc6541"],"site_name":"Docs","title":"New-CMDetectionClauseFile","titleSuffix":"Configuration Manager","uhfHeaderId":"MSDocsHeader-Powershell","updated_at":"2026-06-25 11:23 PM","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/new-cmdetectionclausefile","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMDetectionClauseFile","schemaType":"PowershellCmdlet","summary":"<p>ファイルの検出方法句を作成します。</p>\n","uid":"ConfigurationManager.New-CMDetectionClauseFile"}],"ocv-translation-feedback":true},"_xrefmap":{"ConfigurationManager":{"href":"./","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"ConfigurationManager","schemaType":"PowershellModule","uid":"ConfigurationManager"},"ConfigurationManager.New-CMDetectionClauseFile":{"href":"new-cmdetectionclausefile","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMDetectionClauseFile","schemaType":"PowershellCmdlet","summary":"<p>ファイルの検出方法句を作成します。</p>\n","uid":"ConfigurationManager.New-CMDetectionClauseFile"}},"description":"<p>アプリケーションの検出方法で句を作成するには、このコマンドレットを使用します。 この句は、アプリケーションの存在を示すファイルの規則です。</p>\n<p>ファイルではなくフォルダーを検出するには、 <a href=\"new-cmdetectionclausedirectory\">New-CMDetectionClauseDirectory</a> コマンドレットを使用します。</p>\n<p>このコマンドレットを使用した後、展開の種類に <strong>対して Add または</strong><strong>Set-</strong> のいずれかのコマンドレットを使用します。 この検出句オブジェクトを <strong>AddDetectionClause</strong> パラメーターまたは <strong>RemoveDetectionClause</strong> パラメーターに渡します。</p>\n<p>検出句をグループ化するには、デプロイの種類のコマンドレットで <strong>GroupDetectionClauses</strong> パラメーターを使用します。</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":"$clause = New-CMDetectionClauseFile -Path \"C:\\Program Files\\Application\" -FileName App.exe -Value -PropertyType Version -ExpressionOperator GreaterEquals -ExpectedValue \"1.0.0\"\n\nSet-CMScriptDeploymentType -ApplicationName \"CentralApp\" -DeploymentTypeName \"Scripted install\" -AddDetectionClause $clause","description":"","summary":"<p>次の使用例は、バージョン<strong>が<code>1.0.0</code></strong>以上の特定のフォルダー内のアプリケーションapp.exeを検出します。</p>\n","title":"例 1: バージョン別にアプリケーションを検出する"},{"code":"$cla1=New-CMDetectionClauseFile -FileName \"filetest\" -PropertyType Size -ExpectedValue 123 -ExpressionOperator IsEquals -Path \"C:\\\" -Value -Is64Bit\n$cla2=New-CMDetectionClauseFile -FileName \"foldertest\" -PropertyType DateCreated -ExpectedValue (Get-Date) -ExpressionOperator LessThan -Path \"C:\\\" -Value\n$cla3=New-CMDetectionClauseRegistryKey -Hive ClassesRoot -KeyName \"aaa\"\n$logic1=$cla1.Setting.LogicalName\n$logic2=$cla2.Setting.LogicalName\n$logic3=$cla3.Setting.LogicalName\n\nAdd-CMMsiDeploymentType -AddDetectionClause $cla1,$cla2,$cla3 -ApplicationName \"app\" -DeploymentTypeName \"dt\" -InstallCommand \"mycommand\" -ContentLocation \"\\\\server\\sources\\Orca.msi\" -GroupDetectionClauses $logic1,$logic2 -DetectionClauseConnector {LogicalName=$logic2;Connector=\"or\"},{LogicalName=$logic3;Connector=\"or\"}","description":"","summary":"<p>この例では、2 つのファイル句と 1 つのレジストリ句を作成し、それらを使用して MSI 展開の種類をアプリに追加します。</p>\n","title":"例 2: MSI アプリの展開の種類に対して複数の句を作成する"}],"inputs":[{"description":"","name":"<span class=\"no-loc xref\">None</span>\n"}],"links":[{"href":"new-cmdetectionclausedirectory","text":"New-CMDetectionClauseDirectory"},{"href":"new-cmdetectionclauseregistrykey","text":"New-CMDetectionClauseRegistryKey"},{"href":"new-cmdetectionclauseregistrykeyvalue","text":"New-CMDetectionClauseRegistryKeyValue"},{"href":"new-cmdetectionclausewindowsinstaller","text":"New-CMDetectionClauseWindowsInstaller"}],"module":"ConfigurationManager","name":"New-CMDetectionClauseFile","notes":"","outputs":[{"description":"","name":"<span class=\"no-loc xref\">System.Object</span>\n"}],"parameters":[{"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>存在するだけではなく、このファイルのプロパティのルールを評価するには、 <strong>Value</strong> パラメーターを使用します。</p>\n","isRequired":true,"name":"Existence","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>\n              <strong>Value</strong> パラメーターを追加するときは、<strong>PropertyType</strong> と <strong>ExpressionOperator</strong> で <strong>ExpectedValue</strong> を使用します。 これらのパラメーターを使用する場合、ファイルはこのアプリケーションの存在を示す規則を満たす必要があります。 この <strong>ExpectedValue</strong> パラメーターは、ファイル システムと比較する値を指定します。</p>\n<p>比較する値は、指定した <strong>PropertyType</strong> によって異なります。</p>\n","isRequired":true,"name":"ExpectedValue","parameterValueGroup":"","position":"Named","type":"<p><span class=\"no-loc xref\">String</span><span>[</span><span>]</span></p>\n"},{"aliases":"","defaultValue":"None","description":"<p>\n              <strong>Value</strong> パラメーターを追加するときは、<strong>PropertyType</strong> と <strong>ExpectedValue</strong> で <strong>ExpressionOperator</strong> を使用します。 これらのパラメーターを使用する場合、ファイルはこのアプリケーションの存在を示す規則を満たす必要があります。 この <strong>ExpressionOperator</strong> パラメーターは、ファイル システムの値と予想される値を比較する演算子を指定します。</p>\n<p>バージョン 2010 以降、パラメーターの型が <em>RuleExpressionOperator</em> から <em>FileFolderRuleExpressionOperator</em> に変更されました。</p>\n","isRequired":true,"name":"ExpressionOperator","parameterValueGroup":"IsEquals, NotEquals, GreaterThan, LessThan, Between, GreaterEquals, LessEquals, OneOf, NoneOf","position":"Named","type":"<span class=\"no-loc xref\">FileFolderRuleExpressionOperator</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>アプリケーションの存在を示すファイルの名前を指定します。 \n              <strong>Path</strong> パラメーターを使用して、このファイルへのパスを指定します。</p>\n<p>たとえば、Configuration Manager コンソールは既定で <code>C:\\Program Files (x86)\\Microsoft Endpoint Manager\\AdminConsole\\bin\\Microsoft.ConfigurationManagement.exe</code> インストールされます。 このファイルのルールを作成するには、このパラメーターを <code>Microsoft.ConfigurationManagement.exe</code> に、 <strong>Path</strong> パラメーターを <code>%ProgramFiles(x86)%\\Microsoft Endpoint Manager\\AdminConsole\\bin</code> に設定します。</p>\n","isRequired":true,"name":"FileName","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</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>このパラメーターを追加して、このファイルが 64 ビット システムの 32 ビット アプリケーションに関連付けられていることを示します。</p>\n","name":"Is64Bit","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>アプリケーションの存在を示すファイルへのファイル システムのパスを指定します。 \n              <strong>FileName</strong> パラメーターを使用して、ファイルの名前を指定します。</p>\n<p>たとえば、Configuration Manager コンソールは既定で <code>C:\\Program Files (x86)\\Microsoft Endpoint Manager\\AdminConsole\\bin\\Microsoft.ConfigurationManagement.exe</code> インストールされます。 このファイルのルールを作成するには、このパラメーターを <code>%ProgramFiles(x86)%\\Microsoft Endpoint Manager\\AdminConsole\\bin</code> に、 <strong>FileName</strong> パラメーターを <code>Microsoft.ConfigurationManagement.exe</code> に設定します。</p>\n","isRequired":true,"name":"Path","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>\n              <strong>Value</strong> パラメーターを追加するときは、<strong>ExpressionOperator</strong> と <strong>ExpectedValue</strong> で <strong>PropertyType</strong> を使用します。 これらのパラメーターを使用する場合、ファイルはこのアプリケーションの存在を示す規則を満たす必要があります。 この <strong>PropertyType</strong> パラメーターは、評価するファイル プロパティを指定します。</p>\n<p>たとえば、このパラメーターを <code>Version</code> に設定し、 <strong>ExpressionOperator</strong> を <code>IsEquals</code> に、 <strong>ExpectedValue</strong> を <code>1.48.1.0</code> に設定します。 その後、ルールは、指定されたファイルが同じファイル バージョンであることを確認します。</p>\n","isRequired":true,"name":"PropertyType","parameterValueGroup":"DateCreated, DateModified, Version, Size","position":"Named","type":"<span class=\"no-loc xref\">FileFolderProperty</span>\n"},{"aliases":"ValueRule","defaultValue":"None","description":"<p>\n              <strong>Value</strong> パラメーターを追加する場合、ファイルはこのアプリケーションの存在を示す規則を満たす必要があります。 このパラメーターは、 <strong>ExpectedValue</strong>、 <strong>ExpressionOperator</strong>、 <strong>PropertyType</strong> の各パラメーターと共に使用します。</p>\n<p>ルールを評価する代わりに、ファイルが存在することを確認するには、 <strong>Exist</strong> パラメーターを使用します。</p>\n","isRequired":true,"name":"Value","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"}],"schema":"PowershellCmdlet","summary":"<p>ファイルの検出方法句を作成します。</p>\n","syntaxes":["New-CMDetectionClauseFile -FileName <String> -PropertyType <FileFolderProperty> -ExpectedValue <String[]>\n -ExpressionOperator <FileFolderRuleExpressionOperator> [-Is64Bit] -Path <String> [-Value]\n [-DisableWildcardHandling] [-ForceWildcardHandling] [<CommonParameters>]","New-CMDetectionClauseFile -FileName <String> [-Is64Bit] -Path <String> [-Existence] [-DisableWildcardHandling]\n [-ForceWildcardHandling] [<CommonParameters>]"],"uid":"ConfigurationManager.New-CMDetectionClauseFile","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-CMDetectionClauseFile.md","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/new-cmdetectionclausefile","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"New-CMDetectionClauseFile","schemaType":"PowershellCmdlet","summary":"<p>ファイルの検出方法句を作成します。</p>\n","uid":"ConfigurationManager.New-CMDetectionClauseFile"}],"canonical_url":"https://learn.microsoft.com/ja-jp/powershell/module/configurationmanager/new-cmdetectionclausefile?view=sccm-ps","_op_canonicalUrl":"https://learn.microsoft.com/ja-jp/powershell/module/configurationmanager/new-cmdetectionclausefile?view=sccm-ps"},"pageMetadata":"<meta name=\"description\" content=\"<p>アプリケーションの検出方法で句を作成するには、このコマンドレットを使用します。 この句は、アプリケーションの存在を示すファイルの規則です。</p>\n<p>ファイルではなくフォルダーを検出するには、 <a href=&quot;new-cmdetectionclausedirectory&quot;>New-CMDetectionClauseDirectory</a> コマンドレットを使用します。</p>\n<p>このコマンドレットを使用した後、展開の種類に <strong>対して Add または</strong><strong>Set-</strong> のいずれかのコマンドレットを使用します。 この検出句オブジェクトを <strong>AddDetectionClause</strong> パラメーターまたは <strong>RemoveDetectionClause</strong> パラメーターに渡します。</p>\n<p>検出句をグループ化するには、デプロイの種類のコマンドレットで <strong>GroupDetectionClauses</strong> パラメーターを使用します。</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-CMDetectionClauseFile.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-CMDetectionClauseFile\" />\r\n<meta name=\"notes\" content=\"\" />\r\n<meta name=\"schema\" content=\"PowershellCmdlet\" />\r\n<meta name=\"summary\" content=\"<p>ファイルの検出方法句を作成します。</p>\n\" />\r\n<meta name=\"syntaxes\" content=\"New-CMDetectionClauseFile -FileName <String> -PropertyType <FileFolderProperty> -ExpectedValue <String[]>\n -ExpressionOperator <FileFolderRuleExpressionOperator> [-Is64Bit] -Path <String> [-Value]\n [-DisableWildcardHandling] [-ForceWildcardHandling] [<CommonParameters>]\" />\r\n<meta name=\"syntaxes\" content=\"New-CMDetectionClauseFile -FileName <String> [-Is64Bit] -Path <String> [-Existence] [-DisableWildcardHandling]\n [-ForceWildcardHandling] [<CommonParameters>]\" />\r\n<meta name=\"uid\" content=\"ConfigurationManager.New-CMDetectionClauseFile\" />\r\n","themesRelativePathToOutputRoot":"_themes/"}