logo-powershellCreate dynamic SCCM collections
Purpose :
This project allows you to create dynamic SCCM collections with specific maintenance windows. This project has been created to optimize Windows update installation on a VDI infrastructure. There are some requirements to optimize these update installations :

  • VDI (Virtual Desktop Environment) desktops
  • All VDI computer account are located in the same Active Directory OU
  • There are two datacenters with VMware ESX servers and these servers host the VDI stations.
  • The datacenter1 hosts the VDI workstations with a hostname like “vdi-guest-A001”, “vdi-guest-A002”,…
  • The datacenter2 hosts the VDI workstations with a hostname like “vdi-guest-B001”, “vdi-guest-B002”,…

To avoid a high resource consumption on the ESX servers with Windows update installation and VDI station reboots, the Powershell script will do the following actions :

  • list all VDI stations located in the Active Directory OU
  • from the list created above, create one VDI station list located in the datacenter1 (hostname like “vdi-guest-A001”, “vdi-guest-A002”,…) and create one another VDI station list located in the datacenter2 (hostname like “vdi-guest-B001”, “vdi-guest-B002”,…)
  • create automatically VDI station pools consisting of 10 VDI stations located in datacenter1 and 10 VDI stations located in datacenter2
  • create the SCCM collections with the pools created above. These collections will be the children of a parent collection. Create manually this parent collection and keep in mind the ID of this collection (eg. ABC0010C)
  • associate different SCCM maintenance windows for each collection. The first maintenance window will occur every second sunday from 01:00AM to 02:00AM. The second maintenance window will occur one hour later from 02:00AM to 03:00AM… etc

Script :


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Social Media Auto Publish Powered By : XYZScripts.com