New-CMDeviceCollection
New-CMDeviceCollection
Creates a collection for devices and adds the collection to the Configuration Manager hierarchy.
構文
Parameter Set: NewByLimitName
New-CMDeviceCollection -LimitingCollectionName <String> -Name <String> [-Comment <String> ] [-RefreshSchedule <IResultObject> ] [-RefreshType <RefreshTypes> {Both | ConstantUpdate | Manual | Periodic} ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: NewByLimitId
New-CMDeviceCollection -LimitingCollectionId <String> -Name <String> [-Comment <String> ] [-RefreshSchedule <IResultObject> ] [-RefreshType <RefreshTypes> {Both | ConstantUpdate | Manual | Periodic} ] [-Confirm] [-WhatIf] [ <CommonParameters>]
詳細説明
The New-CMDeviceCollection cmdlet creates a collection based on a specific limiting collection. The limiting collection determines which devices can be a member of the device collection that you create. For example, when you use the All Systems collection as the limiting collection, the new collection can include any device in the Configuration Manager hierarchy. You specify the limiting collection by providing its name or ID.
Devices are added to the collection by membership rules. To add members to the device collection use one of the following membership rule cmdlets:
-- Add-CMDeviceCollectionDirectMembershipRule
-- Add-CMDeviceCollectionExcludeMembershipRule
-- Add-CMDeviceCollectionIncludeMembershipRule
-- Add-CMDeviceCollectionQueryMembershipRule
Collections represent logical groupings of resources, such as users and devices. For more information about Configuration Manager collections, see Introduction to Collections in Configuration Manager (https://go.microsoft.com/fwlink/p/?LinkID=259433) on TechNet.
パラメーター
-Comment<String>
Specifies a description of the collection, such as what type of devices are included in the collection.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-LimitingCollectionId<String>
Specifies the ID of the collection that Configuration Manager uses to limit which devices are available to the collection that you are creating. For example, the following ID is the ID of the All Systems collection: SMS00001.
エイリアス |
LimitToCollectionId |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-LimitingCollectionName<String>
Specifies the name of the collection that Configuration Manager uses to limit which devices are available to the collection that you are creating. For example, you can specify the All Systems collection.
エイリアス |
LimitToCollectionName |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Name<String>
Specifies the name for the collection that you want to create. The collection name might reflect an organization or what type of devices are in the collection. For example, you could create a Windows 7 collection to contain all devices running Windows 7.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-RefreshSchedule<IResultObject>
Specifies a schedule that determines when Configuration Manager refreshes the collection.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-RefreshType<RefreshTypes>
Specifies how Configuration Manager refreshes the collection. Valid values are:
-- Manual. The collection is refreshed using the Configuration Manager console or the Configuration Manager SDK.
-- Periodic. The collection is refreshed based on the schedule specified by the RefreshSchedule parameter.
-- ConstantUpdate. The collection is refreshed whenever a member is added to the collection.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Confirm
コマンドレットを実行する前に、ユーザーに確認を求めます。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-WhatIf
コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
例
Example 1: Create a device collection
This command creates a collection for all computers that run Windows® 7. The LimitingCollectionName parameter specifies that any device in the All Systems collection can be a member of the Windows® 7 collection.
PS C:\> New-CMDeviceCollection -Name "Windows 7" -LimitingCollectionName "All Systems"