# Groups

Groups allow you to target a set of devices based on a defined scope, such as location, client properties, or sensor data. Groups are commonly used for device targeting in both OneSite Anywhere and OneSite Health. In OneSite Patch, Business Units are the default as they have additional properties to standard Groups.

You can use Groups to select a set of machines to which you apply client settings, pre-stage content for content push policies, or apply targeted health policies and baselines.

![](/files/VhxCuAC255s2gbpIMQmq)

To access Groups, click **Assets > Groups** from the side bar navigation from the Admin Portal.

![](/files/JwtgE5m1bh0lZEDcO13k)

This will open the Groups page showing all groups and if integrated with Microsoft Configuration Manager (ConfigMgr), **ConfigMgr collections**. When integrated with ConfigMgr, the collections and Groups will display together. To only see the Adaptiva Groups, select the Groups folder on the left or to see only the ConfigMgr Collections, select that folder in the left pane.

## Group settings

When creating or modifying a Group, you will have multiple settings to configure. Below is a description of each setting and some possible use cases.

### General settings

![](/files/YEYDC1gljkxkBMN8wdaQ)

#### Name

* Choose a unique Name that helps identify your device group.
  * E.g. Adaptiva Developer Clients.

#### Description

* Optionally, you can add a description to add additional context.

#### Evaluation Schedules

* Membership Evaluation evaluates new client Devices to assess if they belong to a particular Group. By default, Membership Evaluation is triggered upon saving your Group and will only run once. You can periodically run Membership Evaluation again based on a chosen Schedule.
* Use case
  * You have a Group that is comprised of Linux devices. The schedule you have chosen runs Membership Evaluation daily at 4 AM. A new Linux device is added to your organization at 2 PM on Monday, but does not yet belong to a particular Group. At 4 AM Tuesday Membership Evaluation is run and thus your new Linux device is now added to your Linux Group.

### Group scopes

With **Group Scopes** you can scope devices by **Location**, **SQL query**, **Sensor**, and by directly selecting desired **Devices**.

{% hint style="info" %}
Multiple Group Scopes can be selected at a time, however, we recommended to primarily use **SQL queries** and **Sensors** for a more comprehensive approach. If multiple scopes make the most sense for your business needs, note that the combined scopes make a new, distinct group.
{% endhint %}

![](/files/DHEWD0bYfRW9muhDdUF9)

You can verify your scope by clicking **Save** to save the new Group and then **Show Members > Evaluate Memberships** in the Group Scopes section.

![](/files/4CvPgOQdcQVQG7sN5xc5)

#### Locations

* You can browse and choose a Location that will add all of the Location's Devices to this Group.
* Use case
  * You have created a new Location and want to create a new Group based off of this Location's Devices.

#### SQL Queries

{% hint style="info" %}
SQL Queries is an advanced setting, please reach our to our [Support team](https://www.adaptiva.com/support) for assistance. We recommend that you create, run, and debug any query in SQL Management Studio to ensure that it works as intended.

For all SaaS solutions, use PostgreSQL.
{% endhint %}

* For both on-premises and SaaS solutions, SQL Queries allow you to more granularly add Devices to a group based on specific queried Device properties.

{% tabs %}
{% tab title="SQL" %}

* This query returns the `adaptivaclientid` for all records where the `device_name` matches any name starting with "win". Then you can take the results and add to or create a **Business Unit**.

```sql
SELECT device_id
FROM a_AdaptivaClientDetails
WHERE device_name LIKE 'win%'
```

* This query finds all devices running a server OS in specified data centers and returns their device IDs.

```sql
SELECT device_id 
FROM a_AdaptivaClientDetails 
WHERE operating_system LIKE '%server%' AND location IN (
  'datacenter1',
  'datacenter2',
  'datacenter3'
);
```

{% endtab %}

{% tab title="PostgreSQL" %}
\* This query returns the \`adaptivaclientid\` for all records where the \`device\_name\` matches any name starting with "sea". Then you can take the results and add to or create a \*\*Business Unit\*\*.

```sql
SELECT device_id
FROM a_AdaptivaClientDetails
WHERE device_name ILIKE 'sea%'
```

* This query finds all devices running a server OS in specified data centers and returns their device IDs.

```sql
SELECT device_id 
FROM a_AdaptivaClientDetails 
WHERE operating_system LIKE '%server%' AND location IN (
  'datacenter1',
  'datacenter2',
  'datacenter3'
);
```

{% endtab %}
{% endtabs %}

#### Devices

{% hint style="warning" %}
Device scoping is sensitive to the Client ID. If an administrator reinstalls a Client, the Client receives a fresh ID, and the Business Unit no longer includes the new Client.
{% endhint %}

* By clicking **Browse** you can see all available Devices from every Location. You can select multiple Devices from this table or search and sort to find specific Devices.
* Use case
  * You know exactly which devices you'd like to add to a Group, so you select **Devices** > **Browse** and select multiple Devices from the table.

#### Sensors

* Sensors allow you to gather data from or perform tasks on multiple endpoints simultaneously at scale.
* Use case

  * You have created a Sensor that retrieves details about the currently installed Operating System. You create a Group called Windows and choose the OperatingSystem Sensor under **Group Scopes**. After saving your Group, the Membership Evaluation will run. All devices that are found with a Windows OS, will be added to this Group.

  ![](/files/7F5ifTadDhp5KAc5YJic)

{% hint style="warning" %}
Before inventory information can be used in a Group Scope, it must first be collected on the device. This inventory might take 24 hours or longer if devices are offline.
{% endhint %}

#### Base Scope

* Base scope allows you to create logic gates to include or exclude certain Devices from your Group.
* Use case
  * You have Wi-Fi and VPN devices and would like to exclude Default devices from your group. You can select the **OR** operator and add an existing group for All WiFi Clients and All VPN Clients. This will add in both WiFi and VPN clients and exclude Default devices.

After setting the initial Base Scope, you can add additional Groups to include in the Base Scope. You can add or exclude other Groups or change Operators to customize your Base Scope depending on your needs.

## Creating a Group

In the example below, we'll be creating a new Group that will include only Windows client Devices and exclude Linux devices and will run daily at 2 AM.

This example will take approximately 5-10 minutes to complete.

1. Click **+ New** to create a group and enter the following

   **General Settings**

   * **Name**
     * Enter **Clients - Windows ONLY**.
   * **Description**
     * For our example, we'll leave this blank since it is self-explanatory.
   * **Evaluation Schedules**
     1. Click **Browse** and select the **Schedules** folder then the select **Daily at 2 AM** schedule from the table.
     2. Click **OK**

        ![](/files/qdhGX0SubbwiSSiZfvXx)
2. Select **Base Scope** from the **Group Scopes** section.
3. Select **Add Operator > NOT** from the more options ellipses next to **Select Operator**.

   ![](/files/R6ILZSjGU3jQiW9ef0qj)
4. Select **Add Group** from the more options ellipses.
5. Select existing **Clients-Linux** from the table.
6. Click **OK**.

   ![](/files/ACyvjg7QiZBL10ffYSiT)
7. Click **Save**

   ![](/files/mqxnsEejx8d0fsIIqXTu)
8. Select **Show Members** > **Evaluate Membership** to verify the correct client Devices were added to your Group. Since we have a schedule, this would trigger daily at 2 AM, but we can select **Evaluate Membership** to trigger immediately.

   ![](/files/RPgXPuZtxH42zxjNol3X)

## More Options

You can perform additional operations on the Group by clicking the **More** dropdown.

![](/files/M5jzlTl4hwtAulRdoNDc)

* **New Group** - Create a new group.
* **Open Group** - Open a group in a separate tab.
* **Show Changes** - Show the changes from the previous version.
* **Save As** - Save the group with a new name.
* **Delete** - Permanently delete the group.
* **Export** - Export the group as an .obex or .json file.
* **Show References** - View and change the group hierarchy.
* **Manage Permissions** - Apply custom permissions to the group.
* **Sync Policies** - Force the immediate sync of group policies.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.adaptiva.com/platform-guide/platform-features/assets/groups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
