# Deploying Collector

## Deploying Collector using Active Directory Group Policy <a href="#installingcollectoronwindows-deployingcollectorusingactivedirectorygrouppolicy" id="installingcollectoronwindows-deployingcollectorusingactivedirectorygrouppolicy"></a>

In this section, learn how to deploy Collector over large groups of devices using a Group Policy Object (GPO) for Active Directory environments. The instructions assume that you are a system administrator with a good understanding of the Windows operating system and enterprise software deployment.

### Create a distribution point <a href="#installingcollectoronwindows-createadistributionpoint" id="installingcollectoronwindows-createadistributionpoint"></a>

{% stepper %}
{% step %}
Log in to the server as an administrator user.
{% endstep %}

{% step %}
Create a shared network folder.
{% endstep %}

{% step %}
Set permissions on this folder to allow access to the distribution package.
{% endstep %}

{% step %}
Copy the Collector MSI to the shared folder.
{% endstep %}

{% step %}
Generate transform files (MST) to control the options passed to the MSI for installation. For example, use the Microsoft Orca utility to generate the MST.
{% endstep %}

{% step %}
Copy the generated MST to the shared folder.
{% endstep %}
{% endstepper %}

Create a Group Policy Object:

{% stepper %}
{% step %}
Select **Start > All Programs**.
{% endstep %}

{% step %}
Select **Administrative Tools**.
{% endstep %}

{% step %}
Select **Active Directory Users and Computers**.
{% endstep %}

{% step %}
Right-click your domain name in the console tree, select **New** and click **Organizational Unit**.
{% endstep %}

{% step %}
In the **New Object** dialog box, type a descriptive name for the new organizational unit (OU), and then click **OK**.
{% endstep %}

{% step %}
In the right panel, select **Computers** and click on the computer you want to add to your organizational unit.
{% endstep %}

{% step %}
Drag and drop these computers in the name of the organizational unit created. In the right panel, select **Nexthink\_Collector\_Deploy**, you will see all the computers tied to your organizational unit.
{% endstep %}

{% step %}
Select the **Start** button, go to **All Programs**.
{% endstep %}

{% step %}
Select **Administrative Tools**.
{% endstep %}

{% step %}
Select **Group Policy Management**.
{% endstep %}

{% step %}
Right-click your domain name in the console tree and select **Create a GPO in this domain**, and **Link it here...**
{% endstep %}

{% step %}
In the **New GPO** dialog box, type a descriptive name for the new policy, and then click **OK**.
{% endstep %}
{% endstepper %}

### Assign an MSI package <a href="#installingcollectoronwindows-assignanmsipackage" id="installingcollectoronwindows-assignanmsipackage"></a>

{% stepper %}
{% step %}
Select **Start > All Programs**.
{% endstep %}

{% step %}
Select **Administrative Tools**.
{% endstep %}

{% step %}
Select **Group Policy Management**.
{% endstep %}

{% step %}
Right-click your GPO name and select **Edit...**
{% endstep %}

{% step %}
On this **Group Management Editor**, expand **Computer Policies, Software Settings and Software Installation**, select **New** and then click **Package...**
{% endstep %}

{% step %}
In the **Open** dialog box, browse to the distribution point you created for Nexthink Collector during the distribution point.
{% endstep %}

{% step %}
Select the MSI file containing the Collector installer you want to deploy, and then click **Open**.
{% endstep %}

{% step %}
In the **Deploy Software** dialog box, select **Advanced**, and then click **OK**.
{% endstep %}

{% step %}
In the **Properties** dialog box for the package you created.

1. Click the **Deployment** tab, and then select **Uninstall** this application when it falls out of the scope of management.
2. Click **Advanced** on the **Deployment** tab, choose **Ignore language when deploying this package**, uncheck the option **Make this 32-bit X86 application available to Win64 machines**, and then click **OK**.
3. On the **Modifications** tab, specify any modification transforms you want to apply when the package is installed by clicking **Add** and then opening each transform from its network location.
4. On the **Security** tab, verify the names of the computers to which you are assigning software.
5. Click **OK** to close the Properties dialog box.
   {% endstep %}

{% step %}
In the **Group Policy** dialog box, expand **Computer Configuration, Administrative Templates, and Windows Components**.

1. In the **Windows Components** folder, select **Windows Installer**.
2. Select **Always install with elevated privileges**.
3. Select **Properties**.
4. In the **Always install with elevated privileges Properties** dialog box, select the **Setting** tab, select **Enabled**.
5. Select **OK**.
   {% endstep %}

{% step %}
In the **Windows Installer** panel of the **Group Policy** dialog box, right-click **Logging**, and then select **Properties**.

1. In the **Logging Properties** dialog box, on the **Setting** tab, select **Enabled**.
2. Then, in the **Logging** text box, type **iweaprcv**.
3. Click **OK** to close the **Logging Properties** dialog box.
   {% endstep %}

{% step %}
In the **Group Policy** dialog box, click **File**, and then click **Exit**.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
The GPO must be propagated to the Active Directory Global Catalog and then to the individual computers. Therefore, allow 5-10 minutes before restarting the computers to which you are assigning Collector, or plan to restart the client computers twice before the system policies are synchronized.
{% endhint %}

### Test your results <a href="#installingcollectoronwindows-testyourresults" id="installingcollectoronwindows-testyourresults"></a>

{% stepper %}
{% step %}
Go to a target PC that is a member of the OU you tied the policy to.
{% endstep %}

{% step %}
Select **Start > Run**, and run the following command:

```shellscript
gpupdate /force
```

{% endstep %}

{% step %}
When the logoff or restart message appears, press **Y**, then **Enter**.
{% endstep %}

{% step %}
During restart, the system displays the **Installing Nexthink Collector...** message for about a minute, depending on the speed of your network and PC.
{% endstep %}

{% step %}
Select **Start > Run**, and run the following command to show the event viewer message:

```shellscript
eventvwr.msc
```

{% endstep %}

{% step %}
In the left pane, select **Application**. Certain source events are shown as logged by MsiInstaller as a Success Audit event.
{% endstep %}

{% step %}
In case of errors, go to `C:Windows/Temp/Msi.log` and see the error log generated.
{% endstep %}
{% endstepper %}

To redeploy a package, for example, when doing an upgrade:

{% stepper %}
{% step %}
Select **Start > Programs**,
{% endstep %}

{% step %}
Select **Administrative Tools**.
{% endstep %}

{% step %}
Select **Group Policy Management**.
{% endstep %}

{% step %}
Right-click your domain name in the console tree and select the **Properties** context menu.
{% endstep %}

{% step %}
Go to the **Group Policy** tab.
{% endstep %}

{% step %}
Select the object you used to deploy the package and select **Edit**.
{% endstep %}

{% step %}
Expand the **Software Settings** element (per user or per machine) which contains the deployed package.
{% endstep %}

{% step %}
Expand the **Software Installation** element which contains the deployed package.
{% endstep %}

{% step %}
Right-click the package in the right pane of the **Group Policy** window.
{% endstep %}

{% step %}
Select the **All Tasks** menu.
{% endstep %}

{% step %}
Select **Redeploy application**.
{% endstep %}

{% step %}
Select **Yes** to reinstall the application wherever it is installed.
{% endstep %}

{% step %}
Close the **Group Policy Management Editor**.
{% endstep %}

{% step %}
Select **OK** and exit the Group Policy Management.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
The GPO must be propagated to the Active Directory Global Catalog and then to individual computers. For this reason, allow 5-10 minutes before restarting the computers to which you are assigning Collector, or plan to restart the client computers twice before the system policies are synchronized.
{% endhint %}

### Optional: Remove a package <a href="#installingcollectoronwindows-optional-removeapackage" id="installingcollectoronwindows-optional-removeapackage"></a>

{% stepper %}
{% step %}
Select **Start > Programs**,
{% endstep %}

{% step %}
Select **Administrative Tools**.
{% endstep %}

{% step %}
Select **Group Policy Management**.
{% endstep %}

{% step %}
Right-click your domain name in the console tree and select the **Properties** context menu.
{% endstep %}

{% step %}
Go to the **Group Policy** tab.
{% endstep %}

{% step %}
Select the object you used to deploy the package and select **Edit**.
{% endstep %}

{% step %}
Expand the **Software Settings** element (per user or per machine) which contains the deployed package.
{% endstep %}

{% step %}
Expand the **Software Installation** element which contains the deployed package.
{% endstep %}

{% step %}
Right-click the package in the right pane of the **Group Policy** window.
{% endstep %}

{% step %}
Select the **All Tasks** menu.
{% endstep %}

{% step %}
Select from the following options:

* Immediately uninstall the software from users and computers.
* Allow users to continue to use the software but prevent new installations.
  {% endstep %}

{% step %}
Select **OK** to continue.
{% endstep %}

{% step %}
Close the **Group Policy Management Editor**.
{% endstep %}

{% step %}
Select **OK** and exit the Group Policy Management.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
The GPO must be propagated to the Active Directory Global Catalog and then to individual computers. For this reason, allow 5-10 minutes before restarting the computers to which you are assigning Collector, or plan to restart the client computers twice before the system policies are synchronized.
{% endhint %}

## Deploying Collector through Microsoft Configuration Manager <a href="#installingcollectoronwindows-deployingcollectorthroughsccm" id="installingcollectoronwindows-deployingcollectorthroughsccm"></a>

{% hint style="info" %}
Microsoft Configuration Manager (ConfigMgr) was formerly known as:

* System Center Configuration Manager (SCCM)
* Microsoft Endpoint Configuration Manager (MECM)

Nevertheless, the following deployment procedure is the same for all versions of the configuration manager.
{% endhint %}

This section explains how to deploy Collector over groups of end-user devices using Microsoft Configuration Manager 2012. For other versions of the configuration manager, the procedure may be slightly different. Refer to the manual deployment of software packages in the user manual of your specific version.

The following instructions assume that you are:

* A systems administrator with a basic understanding of the Windows operating system and deploying enterprise software
* Familiar with Microsoft Configuration Manager

This procedure requires you to provide an executable file that is responsible for the actual installation of Collector on your devices. To generate this executable, use the [Nexthink Collector installer](#installingcollectoronwindows-prerequisites-4).

### Deployment procedure <a href="#installingcollectoronwindows-deployingcollectorthroughsccm2012" id="installingcollectoronwindows-deployingcollectorthroughsccm2012"></a>

Create a collection of devices:

{% stepper %}
{% step %}
Select **Start > Microsoft System Center 2012** program group.
{% endstep %}

{% step %}
Run the Configuration Manager console.
{% endstep %}

{% step %}
In the **Assets and Compliance** workspace on the left-hand side of the main panel, right-click **Device Collections**.
{% endstep %}

{% step %}
Select **Create Device Collection**.
{% endstep %}

{% step %}
On the **General** page of the **Create Device Collection Wizard**, specify the following fields:
{% endstep %}
{% endstepper %}

| Field               | Description                                                                                                                                                                                                                      |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                | A unique name for the collection.                                                                                                                                                                                                |
| Comment             | <p>Optional field</p><p>Comment describing the intent of the collection.</p>                                                                                                                                                     |
| Limiting collection | <p>Optional field</p><p>Click <strong>Browse</strong> to select a collection that puts a limit on the members of the current collection or select <strong>All systems</strong> in order to not limit the current collection.</p> |

Create a boundary and add it to a boundary group:

{% stepper %}
{% step %}
In the Configuration Manager console, go to the **Administration** workspace.
{% endstep %}

{% step %}
Right-click **Boundaries** and select **Create Boundary**.
{% endstep %}

{% step %}
Define the boundary by setting additional restrictions on the target devices in which to push the software installation, for example, by IP address range.
{% endstep %}

{% step %}
Right-click **Boundary Groups** and select **Create Boundary Group**.
{% endstep %}

{% step %}
Type in a name for the group.
{% endstep %}

{% step %}
Add the previously created boundary to this group.
{% endstep %}

{% step %}
**Optional**: Verify that you added the correct number of devices to the group by looking at the value in the column **Member Count**.
{% endstep %}
{% endstepper %}

Create the application to install:

{% stepper %}
{% step %}
In the Configuration Manager console, go to the **Software Library** workspace.
{% endstep %}

{% step %}
Right-click **Applications** and select **Create Application**.
{% endstep %}

{% step %}
Choose the option **Manually specify the application information**.
{% endstep %}

{% step %}
Specify the location and name of the application; in this case, `Nexthink_Collector_Installer_Silent.exe`. The new application is added to the list of available applications.
{% endstep %}
{% endstepper %}

Now the new application should appear in the list. When you click it, there is a **Deployments** tab at the bottom of the window. Later this tab will show a list of deployments of this application to different device groups.

Distribute and deploy the application:

{% stepper %}
{% step %}
In the list of **Applications**, right-click the previously created Collector application and select **Distribute Content**. The distribution wizard opens.

1. Confirm the correct executable file of the installer, which is `Nexthink_Collector_Installer_Silent.exe`.
2. As **Content Destination**, select **Distribution Point**.
3. Specify the shared folder that holds the installer.
   {% endstep %}

{% step %}
**Optional**: Survey the distribution process from the Configuration Manager console.

1. In the main panel, navigate to **Monitoring** > **Distribution Status** > **Content Status**.
2. Click the application that you have just distributed. If you see **Success** and a green-colored graph below, you can now deploy the application.
   {% endstep %}

{% step %}
Back in the **Software Library** workspace, navigate to **Applications**.
{% endstep %}

{% step %}
Right-click the Collector application and select **Deploy**.

1. Select the collection of devices that you created earlier.
   * If you cannot see your collection in the list, switch from **User Collections** to **Device Collections**.
2. Check that the distribution point is correct and click **Next**.
3. Set **Action** to **Install** and **Purpose** to **Required** and click **Next**.
4. Set the **Schedule** to an appropriate moment to start the deployment, for example **As soon as possible**, and click **Next**.
5. Tick **Software installation** and click **Next**.
6. Accept the default options for the rest of the wizard.
   {% endstep %}

{% step %}
**Optional**: Check the status of your deployment in the **Deployments** tab at the bottom of the window.
{% endstep %}
{% endstepper %}

To verify the deployment on a client device, log in to the client device and wait for the pop-up notification about the installation of new software.

To speed up this process, manually force the software deployment evaluation cycle in the Microsoft Configuration Manager client:

{% stepper %}
{% step %}
Open the **Control Panel**.
{% endstep %}

{% step %}
Navigate to **Configuration Manager** and click the **Actions** tab.

1. Choose **Machine Policy Retrieval & Evaluation Cycle** and click **Run Now**.
2. Choose **Application Deployment Evaluation Cycle** and click **Run Now.**
   {% endstep %}
   {% endstepper %}

To debug the deployment process and see its log files, check the following:

* On the server machine, open Microsoft Configuration Manager to view log files\
  `C:\Program Files\Microsoft Configuration Manager\tools\cmtrace.exe`
* The server logs are stored in\
  `C:\Program Files\Microsoft Configuration Manager\Logs\`
* On the client machine, the logs are stored in one of these three paths:
  * `C:\Windows\CCM\`
  * `C:\Windows\ccmsetup\`
  * `C:\Windows\ccmcache\`

If your deployment is not successful, check the following troubleshooting points:

* In the Configuration Manager console, navigate to **Administration** > **Site Configuration** > **Servers and Site System Roles** and choose your server. In the table below, right-click **Distribution point** and select **Properties**. In the **Boundary Groups** tab, verify that the boundary group that you previously created is listed in the **Boundary Groups list**. If not, add it to the list.
* In the Configuration Manager console, navigate to **Software Library** > **Applications**. Right-click the Collector application and select **Properties**. Verify the following points:
  * In the **Distribution Settings** tab, ensure that the option **Distribute the content for this package to preferred distribution points** is ticked.
  * In the **Content Locations** tab, make sure that your distribution point (the path to your shared folder) is in the table. If not, add it, and click **Redistribute**.
* If the remote installation fails with error code `0x87d00324` (displayed in Software Center on the client machine), the installation itself was in fact successful and Collector should be running. It is the mechanism for detecting the installation of the application which has failed. In this case, check the detection criteria:
  1. In **Software Library**, right-click the deployed Collector application and select **Properties**.
  2. In the tab **Deployment Types**, double-click the installer script in the list **Detection Method**.
  3. Check if the detection method is configured correctly. Since you are using the Collector installer executable, the detection should be done by a registry key.

## Deploying Collector within a Windows reference image <a href="#installingcollectoronwindows-deployingcollectorwithinawindowsreferenceimage" id="installingcollectoronwindows-deployingcollectorwithinawindowsreferenceimage"></a>

When including Collector in a Windows reference image, remove the UID that Collector may have generated to identify the device.

To ensure the removal of the device UID:

{% stepper %}
{% step %}
Log in to the Windows device with Collector as a user with administrative rights.
{% endstep %}

{% step %}
Select **Start** and type `cmd` in the search bar to show the Command Prompt application.
{% endstep %}

{% step %}
Right-click the Command Prompt icon and select **Run as administrator** in the context menu.
{% endstep %}

{% step %}
Stop Collector by running the following command in the Command Prompt:

```shellscript
nxtcfg.exe /stop
```

{% endstep %}

{% step %}
Remove the UID of the device by running the following command in the Command Prompt:

```shellscript
reg delete "HKLM\SYSTEM\CurrentControlSet\Services\Nexthink Coordinator\params" /v uid
```

{% endstep %}

{% step %}
To the question **Delete the registry value uid (Yes/No)?**, type `yes`.
{% endstep %}

{% step %}
Remove the license\_UID of the device by running the following command in the Command Prompt:

```shellscript
reg delete "HKLM\SYSTEM\CurrentControlSet\Services\Nexthink Coordinator\params" /v license_uid
```

{% endstep %}

{% step %}
To the question **Delete the registry value license\_uid (Yes/No)?**, type `yes`.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
The system confirms that the operation was successful or displays instead an error message if Collector has not generated the UID yet.
{% endhint %}


---

# 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.nexthink.com/platform/configuring_nexthink/bringing-data-into-your-nexthink-instance/deploying-nexthink-in-non-vdi-environment/installing-collector/installing-collector-on-windows/deploying-collector-on-windows-tp.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.
