> ## Documentation Index
> Fetch the complete documentation index at: https://bloodhound.specterops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Run Multiple AzureHound Enterprise Collectors on One Server With Scheduled Tasks

<img noZoom src="https://mintcdn.com/specterops/tTIczgde9H07oLXf/assets/enterprise-edition-pill-tag.svg?fit=max&auto=format&n=tTIczgde9H07oLXf&q=85&s=b682a26b342bde12302ec829e265bdb6" alt="Applies to BloodHound Enterprise only" width="225" height="45" data-path="assets/enterprise-edition-pill-tag.svg" />

## Purpose

This article outlines how to set up multiple AzureHound Enterprise collectors on the same server using scheduled tasks. Authorized Active Directory administrators should use this when experiencing issues while running multiple AzureHound collectors simultaneously on the same server.

## Process

### A. Create the AzureHound files for all Azure tenants

1. Follow the [AzureHound Enterprise System Requirements and Deployment Process](/install-data-collector/install-azurehound/system-requirements) through deployment in step 3. Deploy and maintain AzureHound: [Run and Upgrade AzureHound (Windows, Docker, or Kubernetes).](/install-data-collector/install-azurehound/installation-options)

2. Organize the files created in a directory structure with a single AzureHound binary and a directory at the same level for each desired tenant configuration.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-174.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=792d7d78da49e78c1c4b17d0038d633d" alt="" width="981" height="478" data-path="assets/image-174.png" />
</Frame>

3. Update associated paths in each **config.json** file to reflect the new file locations. The example below shows the **default-tenant** directory pictured in step 2.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-175.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=102238a8aa7d0b6ad454a504c8f7d4f2" alt="" width="760" height="651" data-path="assets/image-175.png" />
</Frame>

### B. Setup the Scheduled Task

1. Log in to an Administrator account on a computer with access to the desired collection server. Then, from the **Windows S\*\*\*\*tart** menu, open the **Task Scheduler** application.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-176.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=f8b6083c418ee83470cda39b4f49bcad" alt="" width="360" height="443" data-path="assets/image-176.png" />
</Frame>

2. From the **Action** menu, select **Create task…** This will open a window to name and configure a new task.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-177.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=8cc9de8ed48154b6302db5fce9774c32" alt="" width="307" height="270" data-path="assets/image-177.png" />
</Frame>

3. Best practices recommend naming tasks after their collector service and tenant to ensure clarity when reviewing multiple tasks across multiple collectors and/or tenants. In this example, **AzureHound Enterprise** is the collector, and the tenant referenced is **Dumpster**.

   In the Security options in the lower portion of the **General** tab, select the **Change User or Group...** button to run this task as **SYSTEM**. This ensures the scheduled task remains independent from user activity.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-178.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=696bd3062ddffbe99d5b346290fae603" alt="" width="632" height="480" data-path="assets/image-178.png" />
</Frame>

4. On the **Trigger** tab, click **New**.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-179.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=4ca8dd48215c4b8c26242a2e362191be" alt="" width="632" height="480" data-path="assets/image-179.png" />
</Frame>

5. On the **New Trigger** screen, set the task to run **Daily**, **repeating every 5 minutes** for a **duration of 1 day**. This ensures the task restarts if an issue arises.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-180.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=a99d6487a92d6c65865bab993ace606c" alt="" width="591" height="516" data-path="assets/image-180.png" />
</Frame>

5. On the **Action** tab, **New**.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-181.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=0f4729e85fa4b4c132bdefeaee34d725" alt="" width="632" height="480" data-path="assets/image-181.png" />
</Frame>

6. On the **New Action** window, select **Start a program**, then **Browse...** to the location of AzureHound with the config file for that Azure tenant. Modify the following argument to match the location of the appropriate **config.json**, then fill in the **Add arguments (optional)** field, and click **OK**.

```
    start -c "C:\\AzureHound\\dumpster-tenant\\config.json"
```

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-182.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=782e0ebc86bf7794938f891c146c2954" alt="" width="454" height="500" data-path="assets/image-182.png" />
</Frame>

6. On the bottom of the **Conditions** tab, check the **Start only if the following network connection is** **available:** checkbox, and select **Any connection**.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-183.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=6d3ba9bdc31ff50f678607ed306320e4" alt="" width="632" height="480" data-path="assets/image-183.png" />
</Frame>

7. On the **Settings** tab, enable the **Stop the task if it runs longer than 1 day** setting, then select **OK**.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-184.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=aafcc2f363689b2f64651b691c5b23e7" alt="" width="632" height="480" data-path="assets/image-184.png" />
</Frame>

8. Right-click on the new **AzureHound** task in the **Task Scheduler** window, and choose **Run**.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-185.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=a3c0a02568f8e673e2b4c20afb730647" alt="" width="226" height="183" data-path="assets/image-185.png" />
</Frame>

9. Navigate to your BloodHound Enterprise tenant, click on the **Gear icon**, then **Administration,** and scroll down in the **Manage Clients** view to confirm AzureHound is executing collections appropriately. If the task is set up correctly, there will be a green dot next to **Ready**.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-186.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=d5d158ecd38b9e7ffe82dae4248617c3" alt="" width="1499" height="122" data-path="assets/image-186.png" />
</Frame>

### C. Setup remaining Scheduled Tasks

Repeat **Section B** for any additionally required scheduled tasks for other Azure tenants.

## Outcome

When this process is executed successfully, scheduled tasks automatically direct multiple AzureHound collections to run on the same server simultaneously and in a way that is clearly distinguishable from discrete user activity.

<Frame>
  <img src="https://mintcdn.com/specterops/xhId2ad7n1mFRAEQ/assets/image-187.png?fit=max&auto=format&n=xhId2ad7n1mFRAEQ&q=85&s=20d74bad2ea4b1b6171147f170e7f71d" alt="" width="1499" height="235" data-path="assets/image-187.png" />
</Frame>
