Pragma Systems Technical Forum

Powershell to configure users in Pragma Fortress

https://forums.pragmasys.com/Topic293.aspx

By rmassart - 5/12/2015 3:26:06 AM

Hi,

Is there some way to use powershell (or some other scripting) to create SFTP users in Fortress?  We already generate users in the Active Directory, but we need to create individual entries for these users in Fortress. Ideally we would like to script this process. The reason for the individual users is because they have personalised home directories that are configured using two AD properties "msIIS-FTPRoot" and "msIIS-FTPDir".  These are used by IIS for user isolation.

So: is there anyway to script the addition of users to the Local Server Configuration?

Thanks,
Robin
By bethredd - 5/12/2015 4:43:31 AM

Hello,

All of our configurations are stored in the registry, so you can write a script that would create the user configuration. I suggest you copy the settings under the key HKEY_LOCAL_MACHINE\SOFTWARE\PragmaSystems\SFTP\Users\Default to get all of the necessary values and their default values. You can then make the changes need to create the configuration you need.
 
We use a question mark (?) to separate domain\username.

Here is a quick example:

copy-item -Path HKLM:\SOFTWARE\PragmaSystems\SFTP\Users\Default HKLM:\SOFTWARE\PragmaSystems\SFTP\Users\domain?user1

set-itemproperty -path HKLM:\SOFTWARE\PragmaSystems\SFTP\Users\domain?user1 -name StartDir-value user_home_directory
By rmassart - 5/12/2015 8:15:13 PM

Is there no way to import users using an XML file (other than the import settings file)?  Or via an API?

Thanks,
Robin
By bethredd - 5/13/2015 6:42:09 AM

We have the option to import settings at installation time or using the settings import file, but we do not provide an API for XML import from the command line.