Configuring the Datto EDR PowerShell module
NAVIGATION > Admin > Users & Tokens > API Tokens
NAVIGATION > My Profile > API Tokens
SECURITY Datto EDR subscription with administrator or analyst-level platform access
SECURITY Service account or administrator-level rights on the target endpoint
This article describes how to configure the Datto EDR PowerShell module on an endpoint in your environment to enable communication with the EDR API.
NOTE To learn how to use the PowerShell module, refer to the articles listed in Working with the API.
Before you can run HTTP requests against your EDR instance, you'll need to generate an API token for use with the EDR PowerShell module.
-
If you are an EDR administrator, follow the Admin user steps in Generating Datto EDR API tokens to create the token. If you are an EDR analyst, follow the All other users steps.
-
Give the token a name that identifies its function, such as "PowerShell API (JSMITH-PC)."
-
Once you've generated the token, proceed to the next section of this article.
-
On the endpoint from which you'd like to communicate with the API, launch an administrative instance of PowerShell.
NOTE If you are a non-Windows user, you may be able to use PowerShell Core to complete these steps. Datto is unable to provide support for third-party applications.
-
Install the PowerShell EDR module by running the following command.
PS > Install-Module InfocyteHUNTAPI
-
If you see the message, "You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?" select [A] Yes to All.
-
Register your Datto EDR instance with the API token. Doing so will store the token and server information in a global variable for use with API commands.
Replace <instanceName> with the first part of your EDR instance's address. As an example, for the URL https://alpo1.infocyte.com, enter alpo1.
Replace <token> with the PowerShell API token ID you generated for the endpoint.
-
You'll see a message stating that your authorization token is being set for the specified URL.
PS > Set-ICToken -Instance <instanceName> -Token <token> -save
Once you've successfully completed the above configuration steps, you're ready to interact with your cloud-hosted EDR instance. For more information, refer to the following articles.