Quantcast
Channel: Configuration Manager 2012 - Application Management forum
Viewing all articles
Browse latest Browse all 4762

Powershellscript: poll Ad groups for SCCM, insert changed objects

$
0
0

Hi,

 

We have a administration system which puts software requests in AD groups, these AD group are polled by SCCM 2012 collections, to these collections software is deployed. These queries of SCCM collections puts a heavy load on SCCM whereas we want to move the load to another server.

We can’t make the administration system put the computer objects directly in SCCM collections, therefore we would like to make a script that polls the limited number of AD groups and inserts the computer/user ojbects which are added/removed.

 

So it would be something like

 

Foreach ($adgroup in $adgroups)

{

Get-adgroupmembership $adgroup

#See changes compared to previous check = $changedobjects

Add-CMDeviceCollectionDirectMembershipRule -CollectionName "collection" -ResourceId ((Get-CMDevice -name $changedobjects).ResourceID )

 

}

 

Then there should be a check for errors and errors should be logged.

I wonder if such a script doesn’t exist yet.

Please advise. J.


Jan Hoedt


Viewing all articles
Browse latest Browse all 4762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>