Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

SOLVED Update SCCM Collection Membership via PowerShell

  • Thread starter Thread starter Annumishra
  • Start date Start date
  • Replies Replies 5
  • Views Views 7K

Annumishra

New Member
Messages
3
Reaction score
0
Points
1
Hey
Could you please help me with any command which we can use for updatimg the collection each time a server is added or removed using script only. As for updating i have to make it manually.
 
Try this -
Code:
Invoke-WmiMethod `
-Path "ROOT\SMS\Site_$($SiteCode):SMS_Collection.CollectionId='$CollectionId'" `
-Name RequestRefresh -ComputerName $SiteServer
 
Under your Collection Properties - Membership Rules - you can schedule full update.
 

Forum statistics

Threads
7,186
Messages
28,036
Members
18,324
Latest member
malicin
Back
Top