Use Powershell to create device collections in Configuration Manager for the new Microsoft 365 Apps update channels


While brewing on another blog post, on how I’m preparing for the changes to update channels for Microsoft 365 Apps (formerly known as Office 365 ProPlus), I figured this post will do its justice as a decent opening post.

You may have collections configured for this already, or maybe you don’t. Either way, they probably need some updating before June 9, 2020, as this is the date where the new update channels will start appearing (with the exception of Monthly Enterprise Channel, which is live as we speak).

Also, I’m going to reference some of these collections in my other and upcoming post, so I might as well get this out there, as an help to get started. 🙂


The script is available from my GitHub page here:

The script requires the Configuration Manager Powershell module, which is available from installing the Configuration Manager console.

The script accepts and requires 2 parameters; siteCode and siteServer:

The script needs to be edited with details about limiting collections. These needs to reflect real collections that exists in your environment:

The script does following in headlines:

  • Connects to your Configuration Manager environment
  • Creates a new device collection folder called: Microsoft 365 Apps
  • Creates 14 new collections:
    • 2 for each of the 6 channels: Pilot and Production
    • As well as a general Pilot and Production collections for updating of Microsoft 365 Apps

Configuration Manager

Below is an illustration of the result once the script has successfully run:

Collection membership rule

Let’s take a closer look on the query used in one of the collections. Below the WQL query used on the Current Channel (Preview) collections:

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.ResourceId where SMS_G_System_OFFICE365PROPLUSCONFIGURATIONS.GPOChannel = 'CurrentPreview' or SMS_G_System_OFFICE365PROPLUSCONFIGURATIONS.GPOChannel = 
'FirstReleaseCurrent' or SMS_G_System_OFFICE365PROPLUSCONFIGURATIONS.cfgUpdateChannel = ''"

What I’m doing throughout all the collections, is to look for both the old channel name (GPOChannel) and the new channel name (GPOChannel), as well as the corresponding CDNBaseURL (cfgUpdateChannel).

In above example, that translates into: FirstReleaseCurrent, CurrentPreview and

So in order for this to give any members, the channel either needs to be set by GPO (or by editing the updatebranch registry key in HKLM\SOFTWARE\Policies\Microsoft\office\16.0\common\officeupdate) OR by actually running the channel with the associated CDNBaseURL.

NOTE#1: I do the membership rule this way to cater for the transition from old to new names, and to make sure I really find the devices running the specified channel, whether it’s set by GPO, modifying the registry or just by querying the running channel.

NOTE#2: I’m not setting ‘Use incremental updates for this collection’ automatically. This is intended. I will let you do that yourself if desired. 🙂

List of channels and URL identifiers

For good measures and everyone’s reference, below a complete list of the channel names and their corresponding URL identifiers.

Monthly Enterprise Channel
CDNBaseUrl =

Current Channel
CDNBaseUrl =

Current Channel (Preview)
CDNBaseUrl =

Semi-Annual Enterprise Channel
CDNBaseUrl =

Semi-Annual Enterprise Channel (Preview)
CDNBaseUrl =

Beta Channel
CDNBaseUrl =

Next time?

In my upcoming post I will explain how I’m switching update channels using Configuration Items, as well as the design of my device collections (using the provided script in this post) and how I deploy updates for Microsoft 365 Apps.


3 thoughts on “Use Powershell to create device collections in Configuration Manager for the new Microsoft 365 Apps update channels”

  1. Nice article! I ran the script, but it didn’t complete successfully. It seems that it detects that the ‘Software Updates – Pilots’ limiting collection is not created. Should I create it and does it need to be query based? If so, what would the query be? I didn’t see in this article any instructions on having to create it before running the script and obviously the script doesn’t create it as well. Again, thanks for putting this together!

    • Nevermind! I must not have drank enough coffee yet. I read the article again slower and with a bit more caffeine. 🙂


Leave a Comment

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