Custom rake task for creating csv list of users on Faspex

Rake tasks are scripts that allow you to retrieve, delete or update information on your Faspex server using the command line. This article describes a custom rake task available to save a list of Faspex users to a csv file.

Please note that you must install this rake task as it is not yet included by default on Faspex. For more information on custom rake tasks and how to install them, see this article (Custom rake tasks on Faspex).

Usage

You can list all or a certain subset of users and have the results saved to a csv file with this rake task.

The syntax is as following:

asctl faspex:rake custom:users_list -- [options] 
short form long form description
-ofile --file=file name of the csv file to save user list to (required)
  --all list all users
  --directory list DS (directory service) users
  --external list external users (people without an account on Faspex)
  --selfregistered list self registered users
  --faspex list Faspex users
  --inactive list inactive users
  --expired list expired users
  --admins list only admin users
-s --separator=separator use a different separator (default: ,)
-h --help print out help information for this rake task

Note that you must include at least one of the options specifying which users to list in the command.

Example

To list all users to the file /tmp/faspex_users.csv with a slash (/) separator, you would use the following command:

asctl faspex:rake custom:users_list -- --all --file=/tmp/faspex_users.csv --separator=/

Example output may look like the following:

"UserName"/"FirstName"/"LastName"/"Email"/"UserType"/"Status"
"admin"/"Admin"/"Admin"/"admin@asperasoft.com"/"LocalUser"/"OK"
"janedoe"/"Jane"/"Doe"/"janed@asperasoft.com"/"LocalUser"/"OK"
"kwash"/"Kerry"/"Wash"/"kwash@opa.com"/"LocalUser"/"OK"
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk