Importing Hosts In Bulk

The Hosts tab facilitates two main functions.  To allow Hosts to be added into Passwordstate, and in doing so enable local accounts on those hosts to be managed in the form of Account Discoveries, Password Resets and Account Heartbeats.  And to access these Hosts using our Remote Session Launcher via RDP, SSH, Telnet, VNC, SQL and Teamviewer.  The types of connections that can be used is dependent on the Remote Session Launcher selected.

When navigating to Hosts Home, located on the Hosts Tab in Passwordstate, you are provided with summary information on all the Hosts added to your Passwordstate instance.  This includes the total number of Hosts, a breakdown by type, and the Remote Session Credentials used to access your Hosts.  As Passwordstate uses Role Based Access Control (RBAC) you will only be able to access the Remote Session Credentials you have been granted permission to.

You also have links to Add Host records, View All Host Records and View Host Discovery Jobs.  While this blog is about Importing Hosts in bulk into Passwordstate, you can of course add individual Host Records.  To do this you would simply click on Add Host,

this will present you with the Add New Host screen (the image below is only part of that screen).  Just fill out all the required details and click on Save, or if adding multiple new records, click on the Save & Add Another button,

Add Hosts Through Discovery Jobs

From Hosts Home you have the option of viewing and adding Host Discovery Jobs.  Host Discovery jobs are essentially the same as Account Discovery jobs, except instead of collecting local account information on devices, you’re collecting information about the devices themselves.  At this stage we need to point out that Passwordstate collects this information from Active Directory (AD).  Our software doesn’t “trawl your network” looking for devices.

To add a discovery job to import your Hosts, navigate to Hosts->Hosts Home and click on View Host Discovery Jobs.  This will take you to the Host Discovery Jobs screen.  Underneath the display grid, showing any existing Discovery Jobs, you’ll find the option to Add Discovery Job,

This will take you to the Add Hosts Discovery Job screen.  From this screen you can enter all the specifics associated with the discovery job,

The information you can enter includes,

  • The Discovery Job Name,
  • A Description for the job,
  • The Site Location, only used if you have multiple Remote Site Locations configured,
  • Which Active Directory Domain to query for this discovery job,
  • Selecting the Simulation Mode allows you to receive an email on the results of the discovery job without processing those results,
  • Only Discover hosts with the following Operating Systems by selecting that OS,
  • Only discover Hosts where the Last Logged on date is greater than or equal to a specific date, i.e., only machines logged into since July 2022
  • If you want to, you can Populate the Host’s Tag field with the Organizational Unit (OU) it belongs to,
  • When a new Host is found, set its Remote Connection Properties to a Specific Port Number and connection type,
  • Choose what to do If an existing Host in Passwordstate is no longer found in any of the OUs specified,
  • Specify the Privileged Account Credential used to query your AD Domain.

To query specific AD OUs, click on the active directory ous tab and specify them there.  Lastly on the schedule tab you can specify the time and frequency for running the Host Discovery Job.

Import Hosts via CSV File

From Hosts Home you also have the option of viewing and importing Host Records.  To View All Host Records, navigate to Hosts->Hosts Home and click on View All Host Records.  This will display any existing Host Records in the display grid.

Above the display grid is a Host Filters section which allows you fine tune the Host Records you are searching for. Beneath the display grid are options to Add Host, Import and Export Hosts.  To perform a bulk import of Hosts click on Import,

This will take you to the Import Hosts screen.  From here you’ll need to generate a CSV template, that includes all the fields for a Host Record.  The template shown specifies what fields are required, and allows you to specify the Host Type and Operating System from the drop down lists,

On clicking the Generate CSV Template button, Passwordstate will generate the CSV template and download it to your PC.  For Windows based systems this will typically be C:\Users\<your username>\Downloads.  You can now populate this template with the Hosts you wish to import.  Once you are ready, simply use the Select button, navigate the file system, select the file and then click Submit.  In the example I’ve named the populated template Click_Studios_hosts_template.csv,

On completion of the import process, you’ll be presented with the Import Successful screen advising the number of records that were imported.  Click on the Continue button to return to the Hosts Home screen.

Import Hosts via Scripting With API

Lastly, you can also use the Passwordstate API to import Hosts.  The example PowerShell script below uses the Standard API (the API Key needs to be provided) to import 3 computers.  Please note the script directly below has some data removed, such as the full server names, Passwordstate URL and API key,

This code can be loaded into PowerShell ISE and run.  Again, data such as the full server names, Passwordstate URL and API key has been redacted,

In summary, there are 3 different methods of importing Hosts in Bulk into Passwordstate.  This provides you with the choice of method that best suits you and your environment. If you’d like to share your feedback please send it through to