Stephen,

Is the process that you are using to create an initial DDR during OSD 
documented somewhere? I would like to use this in our environment since we are 
using RBAC.

Thanks,
Chris Brucker

From: [email protected] [mailto:[email protected]] On 
Behalf Of Stephen Leuthold
Sent: Friday, July 11, 2014 8:50 AM
To: [email protected]
Subject: RE: [mssms] SCCM collection creation by script

Nice post David. I tried to comment on it but it errored out.... You can use 
limiting collections with OSD by creating an initial DDR using the SDK to 
ensure the device is in the correct collection before attempting to run the TS. 
Provided your limiting collection query only references SMS_R_System. The DDR 
can create/populate a custom property or an existing, meeting the limiting 
collection's criteria. This way you can still avoid limiting to All Systems and 
still use RBA.

Sent from my Windows Phone
________________________________
From: David O'Brien<mailto:[email protected]>
Sent: ‎7/‎11/‎2014 3:01 AM
To: [email protected]<mailto:[email protected]>
Subject: RE: [mssms] SCCM collection creation by script

Hi,



Just as a kind of best practice, don’t limit all your collections to “All 
Systems”.

Why?

Have a look here: 
http://www.david-obrien.net/2014/05/10/configmgr-collection-updates/<https://urldefense.proofpoint.com/v1/url?u=http://www.david-obrien.net/2014/05/10/configmgr-collection-updates/&k=GMHZ9Dahlqe0SnKIljTE3w%3D%3D%0A&r=OSKJGXYtYr5xTrSXzQ1oBSYRDUWLe5BEhWNutaL88rA%3D%0A&m=iaXNd5Y4jZbEyEHjf099fgTRV9w%2FIrIqoMgz4w%2Fcwrs%3D%0A&s=d5c7b1802b4ba426166731342aa5c8262e25548ab37cac8fe88beb7ea299f6a0>



Cheers

David



From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of steven hosking
Sent: Friday, July 11, 2014 5:46 PM
To: [email protected]<mailto:[email protected]>
Subject: Re: [mssms] SCCM collection creation by script



HI Jason,



understand try these powershell commands:



New-CMDeviceCollection -LimitingCollectionName "all systems" -Name x.x.x.x

Add-CMDeviceCollectionQueryMembershipRule -CollectionName x.x.x.x 
-QueryExpression "select 
SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client
 from SMS_R_System inner join SMS_G_System_NETWORK_ADAPTER_CONFIGURATION on 
SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.ResourceID = SMS_R_System.ResourceId 
where SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.DefaultIPGateway = "x.x.x.x"" 
-RuleName "computers in x.x.x.x"





what I would do is export the default gateways from SQL into excel, and then 
change out the x.x.x.x for the IP address and fill down on the sheet, and copy 
into notepad, clean up the Tab’s then paste it into powershell ISE and run it



hope that helps



Cheers



Steve



From: Jason Wallace<mailto:[email protected]>
Sent: ‎Friday‎, ‎11‎ ‎July‎ ‎2014 ‎5‎:‎33‎ ‎PM
To: [email protected]<mailto:[email protected]>



Hi there Steve

Thanks for that!  That is precisely what we DO have and it works really well 
indeed.

I have an engineer sat there however going through a list of several hundred IP 
subnets and creating this collection.  The list that we built was in itself 
built from a simple DISTINCT selection of default gateways from hardware 
inventory.

I was hoping to go a little further and script the extract from HW inventory 
and then cycle through this list, creating collections based upon the default 
gateways

Jason


________________________________

From: [email protected]<mailto:[email protected]>
To: [email protected]<mailto:[email protected]>
Subject: Re: [mssms] SCCM collection creation by script
Date: Fri, 11 Jul 2014 06:16:35 +0000

Hi Jason,



try this:

select 
SMS_R_SYSTEM.ResourceID,SMS_R_SYSTEM.ResourceType,SMS_R_SYSTEM.Name,SMS_R_SYSTEM.SMSUniqueIdentifier,SMS_R_SYSTEM.ResourceDomainORWorkgroup,SMS_R_SYSTEM.Client
 from SMS_R_System inner join SMS_G_System_NETWORK_ADAPTER_CONFIGURATION on 
SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.ResourceID = SMS_R_System.ResourceId 
where SMS_G_System_NETWORK_ADAPTER_CONFIGURATION.DefaultIPGateway = "x.x.x.x"



Just change the x.x.x.x to the default Gateway Address.



Cheers



Steve



From: Jason Wallace<mailto:[email protected]>
Sent: ‎Friday‎, ‎11‎ ‎July‎ ‎2014 ‎3‎:‎50‎ ‎PM
To: [email protected]<mailto:[email protected]>



Hi folks

A dumb question for this morning but . . .

I am in the midst of a 2007 - 2012 migration.  We want to move devices over by 
IP subnet as there are a large number of branch offices.

I wonder whether someone has a magic script that can allow us to read the 
default gateway from hardware inventory and then create a series of collections 
on that please?

Thanks











**********************************************************************
The information contained in this message from First Financial Bancorp or its 
affiliates and any attachments are confidential.  It is not intended for 
transmission to, or receipt by, anyone other than the addressee(s), or a person 
authorized to deliver it to the named addressee(s).  If you have received this 
message in error, you are prohibited from copying, distributing or using the 
information.  Please contact the sender immediately by return email and delete 
the original message.

Reply via email to