Importing users via CSV files

Importing users via CSV files

Sometimes there is a need to import users though a CSV file. This can be done using a combination of PowerShell and the srxCFG utility.


Lets assume we have a CSV file, users.csv, which looks like this:


Username,FullName,EmailAddress

user1,User Number 1,user1@southrivertech.com

user2,User 2,user2@southrivertech.com

user3,User 3,user3@southrivertech.com


Create a PowerShell script, ImportUsersCsv.ps1 containing the following: (note that your Admin password and Server will be different:



$users = import-csv users.csv

ForEach ($user in $users) {

$username = $($user.Username)

$fullname = $($user.FullName)

$email = $($user.EmailAddress)

.\srxCfg.exe /AdminUser=Administrator /AdminPass=test /Server=SftpServer /Cmd=AddUser /User=$username /FullName=$fullname /EmailAddress=$email

}


This PS script will pull in the users.csv file into an array, $users. Next a loop is performed to pull the Username, Fullname and Email address members from each array item and then feeds those items into the srxCfg.exe utility in the \Program Files\South River Technologies\Titan FTP Server\ folder.


Execute the PS script and the users will be imported in to the system.







    • Related Articles

    • How To: Give Users Admin Permissions

      Question How do I give a user admin capability? Reasoning Managing and administering Titan can be time consuming so having the ability to delegate some of the tasks to a second user would be very helpful. Answer You can enable the administrator ...
    • Video Tutorial: Configure Users to have Admin Privileges - Add Additional Administrators

      Below is a Video Tutorial that details how to add additional Administrators by granting Admin Privileges to Users. The rights are assigned as Role-Based Access. Configure Users to have Admin Privileges
    • Removing a user via the Registry

      Problem: Corrupted user accounts and how to remove a user via the Registry Answer: Have you restarted the Titan Daemon from the Services Applet panel? If so, and the problem still persists, please do the following: If the configuration for Titan has ...
    • How To: Enable PGP Encryption

      Question How do I encrypt files in transit or at rest? Reasoning Keeping files secure is always a concern. Either at rest once they are uploaded to Cornerstone or in transit while the file is still being uploaded even if using a secure protocol. If ...
    • How To: Disable User Accounts with Events

      Question Is there an automated way I can disable user accounts? Reasoning I am seeing user connections from users that are no longer authorized to connect to Titan SFTP server and I would like to have an automation to disable these accounts as they ...