Skip to main content
All CollectionsSign In Solutions VMSAccount FeaturesHosts
How do I have my host list update automatically?
How do I have my host list update automatically?
Reg Gray avatar
Written by Reg Gray
Updated over a week ago

You can always upload a comma-separated values (csv) host list directly in Traction Guest, which you can learn more about HERE.


This article will go through:

  1. How to use PowerShell to pull host data from your Active Directory

  2. How to use Google Scripts to pull host data from your Google Directory

The Host Upload API does not care where the upload is originating from. It only requires:

  1. The upload must be authorized with a API token generated within your account.

  2. The body of the upload needs to be formatted into a CSV style with the first row being headers.


Your IT department will want to be involved with any scripts you plan to run and can schedule an automated task to run the script on a regular cadence.

Watch this video for a walkthrough on how to setup the PowerShell script:




Email [email protected] to reach out to the Customer Success team if you have any questions about this process.

Generating the API Token

To make sure the script is authorized to upload hosts into your Traction Guest account, you will need to generate an API token from the preferences page. The scrips at the bottom of this knowledge article will show you were they must be inputted.

The preferences page can be accessed after clicking the gear icon in the top-right corner of your account. From there, your API token can be generated through these steps:

1. Scroll to the API Tokens section and click CREATE NEW TOKEN.
2. Select the Host Upload token type.
3. Click Next.
4. Copy the generated token. If you do not copy this before you save, you will need to generate a new token to paste into your script.

NOTE: You can only have one Host Upload token in your account at a time.

Hosts - API 1.png
Host - API Token 2.png



Note: These API tokens are specific to each individual user. The user that generates the token will be the "owner" of the hosts when they are uploaded. See the below URL parameters to see how ownership can affect auto deleting hosts.

Revoking Tokens

To revoke an existing token, simply head back into the API Tokens section and click on the 'REVOKE' button. This is required if you'd like to generate a new token.

Script Details


The script has commented sections, marked by "#" or "//" symbols to help explain what is happening and to not require optional fields by default.
Any sections bolded in the script will need to be customized in order to get the script to work.

Also know that there are parameters in the URL that can be changed, by default they are all set to TRUE.
remove_unmatched_hosts=true
If the host is not included in the newest upload, they will be deleted
(unless uploaded by a different user - see "ownership")
ignore_ownership=true
Will disregard which user originally uploaded the host so that the upload by this script is the one source of truth.
You may want to disable this if you have multiple different sources of hosts (manual uploads, different scripts pulling from different Active Directories, etc.)
remove_empty_groups=true
Deletes any groups at the end of the upload that do not contain any hosts
overwrite_person_groups=true
Hosts will only be in groups that are defined in the upload by this script.

You can edit any of these from "true" to "false" if desired.

Click the below links to be directed to the relevant script.

MICROSOFT POWERSHELL SCRIPT: https://github.com/signinsolutions/utils/blob/main/SIE-AD-Hosts-sync.ps1

NOTE: Our legacy Microsoft Powershell Script, in-use prior to June 2023, can be found HERE.

GOOGLE DIRECTORY SCRIPT: https://tractionguest.atlassian.net/wiki/spaces/KB/pages/323485698/Google+Directory+Script

Did this answer your question?