Creating dynamic groups for objects which exist behind a gateway in OpsMgr Part 1
Even when you spend years working on a specific technology occasionally you are pleasantly surprised to find out that something already exists in the product but you are unaware of it.
At the MVP summit one discussion that we had was how we were working on a method in PowerShell to populate groups for objects which exist behind a gateway. Daniele and Bob pointed me to several links which I have included at the end of this blog post. These blogs discuss how you can use a SiteName field when installing a gateway to auto-create groups which include the computer that report to the gateway.
From my tests it appears that it is simple to create a group of objects behind a gateway using this switch during the gateway approval process. The group is auto-created with the name site/<SiteName> and it includes the computer object and the Microsoft.SystemCenter.ManagementService objects. This is totally cool, extremely useful and really not all that well known in the community (as evidenced by a few of our group being aware of this, and myself sitting there picking up my jaw from the floor).
What does the SiteName gateway installation parameter do?
When you install the gateway using this parameter it auto-creates a group using the name that you provide prepended with "Site/" as shown below.
What objects does this group include?
This group includes the computer object and the Microsoft.SystemCenter.ManagementService objects which report to the gateway.
Resources explaining how to use the "SiteName" gateway parameter:
Summary: Are you looking for a quick way to auto-group computers which report to a specific gateway? Try out the /SiteName parameter when using the gateway approval tool.
In the next part of this series I will look at a more complicated example where the requirement is to create auto-populated groups for a variety of objects which exist behind a gateway server including IIS instances, SQL Servers and more!