How to configure AgentP to enroll with a specific domain

In this task, you will learn how to configure AgentP to enroll using a specific domain when multiple domains exist in your authentication repositories.

If you have more than one domain configured in your authentication repositories, such as a mix of Entra ID and Active Directory, AgentP may enroll with the wrong domain. For example, it may enroll as VORLON\kosh instead of kosh@vorlon.com.

  1. Manual solution: Add the registry key before installing and enrolling AgentP.

    If you want to configure this manually on the machine, ppen the Windows Registry Editor and add the following key:

    • Key: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Portnox AgentP
    • Value type: String
    • Value name: Domain
    • Value data: your-domain.com

    Replace your-domain.com with your actual domain name.

    Note:
    If AgentP is already installed, uninstall it first, add the registry key, then install AgentP again.
  2. Automatic solution: Configure AgentP domain enrollment using Intune.

    If you are using Intune to distribute and enroll AgentP and want to automate the above process, follow the instructions to distribute AgentP with Intune, and in addition to the AgentP app, also do the following:

    1. Open a text editor and enter the following content. Then, save this content as a .ps1 file, for example, agentp_domain.ps1.
      New-Item -Path "HKLM:\SOFTWARE\WOW6432Node\Portnox AgentP" -Force | Out-Null; Set-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Portnox AgentP" -Name "Domain" -Value "your-domain.com"

      Replace your-domain.com with your actual domain name.

    2. Open Intune, go to Devices > Windows > Scripts and remediations, go to the Platform scripts tab, and click on +Add to add the script to Intune.

    3. In the Add PowerShell script pane, follow the wizard to add the script. Select any name you like, browse for the .ps1 file that you saved earlier, and then assign the script to devices as needed.