{"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":"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-25T22:37:50.6528568Z"},"_path":"module/configurationmanager/add-cmdevicecollectiondirectmembershiprule.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/add-cmdevicecollectiondirectmembershiprule?view=sccm-ps","content_git_url":"https://github.com/MicrosoftDocs/sccm-docs-powershell-ref/blob/main/sccm-ps/ConfigurationManager/Add-CMDeviceCollectionDirectMembershipRule.md","default_moniker":"sccm-ps","depot_name":"MSDN.sccm-powershell","document_id":"72c8cbd4-71ba-f0e7-15d2-0d0478d66be9","document_version_independent_id":"600d116d-6403-9621-ded8-0a37753e5ea8","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":"cb64faff743ef3d001f913983a4e1164c7cd5047","gitcommit":"https://github.com/MicrosoftDocs/sccm-docs-powershell/blob/cb64faff743ef3d001f913983a4e1164c7cd5047/sccm-ps/ConfigurationManager/Add-CMDeviceCollectionDirectMembershipRule.md","github_contributors":["aczechowski","damabe","sankethka"],"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","open_to_public_contributors":true,"original_content_git_url":"https://github.com/MicrosoftDocs/sccm-docs-powershell/blob/live/sccm-ps/ConfigurationManager/Add-CMDeviceCollectionDirectMembershipRule.md","original_content_git_url_template":"{repo}/blob/{branch}/sccm-ps/ConfigurationManager/Add-CMDeviceCollectionDirectMembershipRule.md","PlatyPS schema version":"2.0.0","products":["https://authoring-docs-microsoft.poolparty.biz/devrel/f1499c3b-793f-48c3-a9ce-20285bcc6541"],"site_name":"Docs","title":"Add-CMDeviceCollectionDirectMembershipRule","titleSuffix":"Configuration Manager","uhfHeaderId":"MSDocsHeader-Powershell","updated_at":"2026-06-25 10:37 PM","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/add-cmdevicecollectiondirectmembershiprule","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"Add-CMDeviceCollectionDirectMembershipRule","schemaType":"PowershellCmdlet","summary":"<p>デバイス コレクションに直接メンバーシップ規則を追加します。</p>\n","uid":"ConfigurationManager.Add-CMDeviceCollectionDirectMembershipRule"}],"ocv-translation-feedback":true},"_xrefmap":{"ConfigurationManager":{"href":"./","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"ConfigurationManager","schemaType":"PowershellModule","uid":"ConfigurationManager"},"ConfigurationManager.Add-CMDeviceCollectionDirectMembershipRule":{"href":"add-cmdevicecollectiondirectmembershiprule","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"Add-CMDeviceCollectionDirectMembershipRule","schemaType":"PowershellCmdlet","summary":"<p>デバイス コレクションに直接メンバーシップ規則を追加します。</p>\n","uid":"ConfigurationManager.Add-CMDeviceCollectionDirectMembershipRule"}},"description":"<p>このコマンドレットを使用して、直接メンバーシップ規則をデバイス コレクションに追加します。\n\n              <em>直接</em>メンバーシップ規則を使用すると、デバイス コレクションのメンバーを明示的に選択できます。\nメンバーシップ ルールを既定のコレクションに追加することはできません。 ターゲットとするコレクションには、 <code>SMS</code>ではなくサイト コードで始まる ID が必要です。\n詳細については、「 <a href=\"/mem/configmgr/core/clients/manage/collections/create-collections\">Configuration Manager でコレクションを作成する方法</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":"Add-CMDeviceCollectionDirectMembershipRule -CollectionId \"XYZ00056\" -ResourceId 16777219","description":"","summary":"<p>このコマンドは、ID <strong>XYZ00056</strong>を使用してデバイス コレクションに直接メンバーシップ規則を追加します。 ID <strong>16777219</strong> を持つリソースがコレクションに追加されます。</p>\n","title":"例 1: 直接メンバーシップ規則を追加する"},{"code":"Get-CMCollection -Name \"testCollection\" | Add-CMDeviceCollectionDirectMembershipRule -ResourceId 16777219","description":"","summary":"<p>このコマンドは、まず <strong>Get-CMCollection</strong> コマンドレットを使用して <strong>、testCollection</strong> という名前のコレクション オブジェクトを取得します。 次に、パイプライン演算子を使用して、 <strong>Add-CMDeviceCollectionDirectMembershipRule</strong> コマンドレットにオブジェクトを渡します。これにより、デバイス コレクション オブジェクトに直接メンバーシップ規則が追加されます。 ID <strong>16777219</strong> を持つデバイスをコレクションに追加します。</p>\n","title":"例 2: パイプラインを使用して直接メンバーシップ規則を追加する"}],"inputs":[{"description":"","name":"<span class=\"no-loc xref\">Microsoft.ConfigurationManagement.ManagementProvider.IResultObject</span>\n"}],"links":[{"href":"get-cmdevicecollectiondirectmembershiprule","text":"Get-CMDeviceCollectionDirectMembershipRule"},{"href":"remove-cmdevicecollectiondirectmembershiprule","text":"Remove-CMDeviceCollectionDirectMembershipRule"},{"href":"get-cmcollection","text":"Get-CMCollection"},{"href":"get-cmdevicecollection","text":"Get-CMDeviceCollection"},{"href":"get-cmresource","text":"Get-CMResource"},{"href":"get-cmdevice","text":"Get-CMDevice"},{"href":"add-cmusercollectiondirectmembershiprule","text":"Add-CMUserCollectionDirectMembershipRule"},{"href":"/mem/configmgr/core/clients/manage/collections/create-collections","text":"Configuration Manager でコレクションを作成する方法"}],"module":"ConfigurationManager","name":"Add-CMDeviceCollectionDirectMembershipRule","notes":"","outputs":[{"description":"","name":"<span class=\"no-loc xref\">System.Object</span>\n"}],"parameters":[{"aliases":"","defaultValue":"None","description":"<p>規則を追加するデバイス コレクションの ID を指定します。 この値は <strong>CollectionID</strong> プロパティです (たとえば、 <code>XYZ00012</code>)。 既定のコレクションにメンバーシップ ルールを追加できないため、この ID はサイト コードで始まり、 <code>SMS</code>ではありません。</p>\n","isRequired":true,"name":"CollectionId","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>規則を追加するデバイス コレクションの名前を指定します。</p>\n","isRequired":true,"name":"CollectionName","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">String</span>\n"},{"aliases":"cf","defaultValue":"False","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>このパラメーターはワイルドカード文字を処理し、予期しない動作が発生する可能性があります (推奨されません)。 \n              <strong>DisableWildcardHandling</strong> と組み合わせることはできません。</p>\n","name":"ForceWildcardHandling","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"Collection","defaultValue":"None","description":"<p>規則を追加するデバイス コレクションのオブジェクトを指定します。 このオブジェクトを取得するには、 <a href=\"get-cmcollection\">Get-CMCollection</a> コマンドレットまたは <a href=\"get-cmdevicecollection\">Get-CMDeviceCollection コマンドレットを</a> 使用します。</p>\n","isRequired":true,"name":"InputObject","parameterValueGroup":"","pipelineInput":true,"position":"Named","type":"<span class=\"no-loc xref\">IResultObject</span>\n"},{"aliases":"","defaultValue":"None","description":"<p>このパラメーターを追加して、作業中のアイテムを表すオブジェクトを返します。 既定では、このコマンドレットは出力を生成しない場合があります。</p>\n","name":"PassThru","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"},{"aliases":"Resources","defaultValue":"None","description":"<p>この直接メンバーシップ規則を使用して、デバイス コレクションに追加するリソース オブジェクトの配列を指定します。 このオブジェクトを取得するには、<a href=\"get-cmresource\">Get-CMResource</a> コマンドレット、または <code>-Resource</code> パラメーターを持つ <a href=\"get-cmdevice\">Get-CMDevice</a> コマンドレットを使用します。</p>\n","isRequired":true,"name":"Resource","parameterValueGroup":"","position":"Named","type":"<p><span class=\"no-loc xref\">IResultObject</span><span>[</span><span>]</span></p>\n"},{"aliases":"ResourceIds","defaultValue":"None","description":"<p>この直接メンバーシップ規則を使用して、デバイス コレクションに追加するリソースの ID の配列を指定します。 この値は <strong>ResourceID</strong> プロパティです (たとえば、 <code>16777219</code>)。</p>\n","isRequired":true,"name":"ResourceId","parameterValueGroup":"","position":"Named","type":"<p><span class=\"no-loc xref\">Int32</span><span>[</span><span>]</span></p>\n"},{"aliases":"wi","defaultValue":"False","description":"<p>コマンドレットが実行されるとどうなるかを示します。 コマンドレットは実行されません。</p>\n","name":"WhatIf","parameterValueGroup":"","position":"Named","type":"<span class=\"no-loc xref\">SwitchParameter</span>\n"}],"schema":"PowershellCmdlet","summary":"<p>デバイス コレクションに直接メンバーシップ規則を追加します。</p>\n","syntaxes":["Add-CMDeviceCollectionDirectMembershipRule -CollectionId <String> [-PassThru] -ResourceId <Int32[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]","Add-CMDeviceCollectionDirectMembershipRule -CollectionId <String> [-PassThru] -Resource <IResultObject[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]","Add-CMDeviceCollectionDirectMembershipRule -CollectionName <String> [-PassThru] -ResourceId <Int32[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]","Add-CMDeviceCollectionDirectMembershipRule -CollectionName <String> [-PassThru] -Resource <IResultObject[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]","Add-CMDeviceCollectionDirectMembershipRule -InputObject <IResultObject> [-PassThru] -ResourceId <Int32[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]","Add-CMDeviceCollectionDirectMembershipRule -InputObject <IResultObject> [-PassThru] -Resource <IResultObject[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]"],"uid":"ConfigurationManager.Add-CMDeviceCollectionDirectMembershipRule","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/Add-CMDeviceCollectionDirectMembershipRule.md","xrefs":[{"href":"https://learn.microsoft.com/powershell/module/configurationmanager/add-cmdevicecollectiondirectmembershiprule","monikerGroup":"f98fea35b6ac2b0f56c6ee5ec06ffce9","name":"Add-CMDeviceCollectionDirectMembershipRule","schemaType":"PowershellCmdlet","summary":"<p>デバイス コレクションに直接メンバーシップ規則を追加します。</p>\n","uid":"ConfigurationManager.Add-CMDeviceCollectionDirectMembershipRule"}],"canonical_url":"https://learn.microsoft.com/ja-jp/powershell/module/configurationmanager/add-cmdevicecollectiondirectmembershiprule?view=sccm-ps","_op_canonicalUrl":"https://learn.microsoft.com/ja-jp/powershell/module/configurationmanager/add-cmdevicecollectiondirectmembershiprule?view=sccm-ps"},"pageMetadata":"<meta name=\"description\" content=\"<p>このコマンドレットを使用して、直接メンバーシップ規則をデバイス コレクションに追加します。\n\n              <em>直接</em>メンバーシップ規則を使用すると、デバイス コレクションのメンバーを明示的に選択できます。\nメンバーシップ ルールを既定のコレクションに追加することはできません。 ターゲットとするコレクションには、 <code>SMS</code>ではなくサイト コードで始まる ID が必要です。\n詳細については、「 <a href=&quot;/mem/configmgr/core/clients/manage/collections/create-collections&quot;>Configuration Manager でコレクションを作成する方法</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/Add-CMDeviceCollectionDirectMembershipRule.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=\"Add-CMDeviceCollectionDirectMembershipRule\" />\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=\"Add-CMDeviceCollectionDirectMembershipRule -CollectionId <String> [-PassThru] -ResourceId <Int32[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]\" />\r\n<meta name=\"syntaxes\" content=\"Add-CMDeviceCollectionDirectMembershipRule -CollectionId <String> [-PassThru] -Resource <IResultObject[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]\" />\r\n<meta name=\"syntaxes\" content=\"Add-CMDeviceCollectionDirectMembershipRule -CollectionName <String> [-PassThru] -ResourceId <Int32[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]\" />\r\n<meta name=\"syntaxes\" content=\"Add-CMDeviceCollectionDirectMembershipRule -CollectionName <String> [-PassThru] -Resource <IResultObject[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]\" />\r\n<meta name=\"syntaxes\" content=\"Add-CMDeviceCollectionDirectMembershipRule -InputObject <IResultObject> [-PassThru] -ResourceId <Int32[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]\" />\r\n<meta name=\"syntaxes\" content=\"Add-CMDeviceCollectionDirectMembershipRule -InputObject <IResultObject> [-PassThru] -Resource <IResultObject[]>\n [-DisableWildcardHandling] [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]\" />\r\n<meta name=\"uid\" content=\"ConfigurationManager.Add-CMDeviceCollectionDirectMembershipRule\" />\r\n","themesRelativePathToOutputRoot":"_themes/"}