Oh, I just read the "SCCM 2007 Primaries" part.  This works on 2012.  No idea 
about 2007.

Todd

From: [email protected] [mailto:[email protected]] On 
Behalf Of Mote, Todd
Sent: Thursday, June 11, 2015 11:11 AM
To: '[email protected]'
Subject: [mssms] RE: Script to add Add Active Directory LDAP paths to SCCM 
Active Directory System Group Discovery

It's not pretty, and I'm not sure if there is a more modern way to do this, but:

$wmiobject = Get-WmiObject -Namespace "Root\SMS\Site_XXX" -Class 
SMS_SCI_Component -ComputerName site.server.fqdn -Filter 
"ComponentName='SMS_AD_SYSTEM_DISCOVERY_AGENT'"

$ADproplist = $wmiobject.PropLists | where {$_.PropertyListName -eq "AD 
Containers"}
$ADproplist.values
$ADproplist.Values += @(("LDAP://OU=path,DC=your,DC=domain,DC=name"),"0","1")
$ADproplist = [System.Management.ManagementBaseObject]$ADproplist
$wmiobject.Proplists += $ADproplist
$wmiobject.Proplists
$wmiobject.put()




From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Boseman, Marcia H - 
Raleigh, NC
Sent: Thursday, June 11, 2015 10:31 AM
To: [email protected]<mailto:[email protected]>
Subject: [mssms] Script to add Add Active Directory LDAP paths to SCCM Active 
Directory System Group Discovery

We have several entries that we need to add to 25 SCCM 2007 Primaries.  Does 
anyone have a script to Add Active Directory LDAP paths to SCCM Active 
Directory System Group Discovery?





Reply via email to