Installing the Windows MDR Agent Using NinjaOne RMM

The Windows Install PowerShell Script for RMM/MDM can be used with NinjaOne to programmatically install the Field Effect MDR agent.

The script requires two inputs:

  1. A Field Effect MDR Portal API token.
  2. One of the following:
    • A client organization name as it appears in the Field Effect MDR Portal.
    • A Field Effect MDR license key unique to the client organization.
  • The API token can be created in the MDR Portal by following the instructions in Create an API Key. The account associated with the token must have administrator permissions.
  • A client's MDR license key can be found in the agent installer ZIP file downloaded from the Portal. For more information, see The Downloads Page.


Install the Agent Using NinjaOne


1. Create the MDR Installation Script

  1. Navigate to Administration > Library > Automation.
  2. Click + Add > New Script.
  3. Paste the MDR Windows installation PowerShell script into the script body.
  4. Configure the script using the following settings:
Name: Field Effect MDR Install
Language: PowerShell
Operating System: Windows
Architecture: All
Run As: System
  1. Create a script variable for the MDR API token:
    1. Click + Add Variable.
    2. Select String/Text as the variable type.
    3. Configure the variable:
Name: api_token
Default Value: <add_your_token_value_here>
  1. Click Add to create the variable, then click Save.


2. Configure Client Identification


The script must be able to identify the target client organization in the Field Effect MDR Portal.


Option A: Use the NinjaOne Organization Name (Recommended)

By default, the script uses the NinjaOne organization name (NINJA_ORGANIZATION_NAME) to identify the client.

  • The organization name in NinjaOne must exactly match the client organization name in the Field Effect MDR Portal.
  • No additional configuration is required.

This is the preferred option for most environments.


Option B: Use a Custom License Key or Client Name

If organization names do not match between NinjaOne and the Field Effect MDR Portal, create a custom field to specify either:

  • FeMdrLicenseKey
  • FeMdrClientName

To create a custom field:

  1. Navigate to Administration > Organizations > Organization Custom Fields.
  2. Click Add and select Text as the field type.
  3. Configure the field as follows.

License Key Mapping

Overview
  Label: Fe Mdr License Key
  Name: FeMdrLicenseKey
Permissions
  Automations: Read
  API: Read
  All Technicians: Editable

Client Name Mapping

Overview
  Label: Fe Mdr Client Name
  Name: FeMdrClientName
Permissions
  Automations: Read
  API: Read
  All Technicians: Editable

3. Set Custom Field Values (Option B Only)

  1. Open the client organization's dashboard.
  2. Select Custom > Default Fields.
  3. Click the pencil icon to edit the dashboard.
  4. Enter the license key or client name in the appropriate custom field.
  5. Click Save.


Deployment Behavior


When the script runs, it identifies the client organization using the following order of precedence:

  1. (Default): NinjaOne Organization Name (NINJA_ORGANIZATION_NAME)
  2. License Key (FeMdrLicenseKey) if configured; OR
  3. Client Name (FeMdrClientName) if configured.

This method allows organizations to be mapped automatically while still supporting organizations where naming conventions differ between NinjaOne and the Field Effect MDR Portal.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article