Export KCS Users and their addresses in TAB-separated Format
I want to get a list of all KCS users and their addresses in any list format (Excel, CSV) for further processing.
Using the ASCII backup method (TCFW menu option - Admin - Server - Backup/Restore) gives me the list of users, but the format cannot be easily processed.
Is there any other method to get this list of KCS users?
Yes there are in fact 2 methods to get a list of KCS users in a TAB-separated format:
Method 1: Exporting the Address view of the user.
With this method you get one line for each address defined for any user, i.e. if a user has assigned a TOPCALL address and a FXI address, the export file contains 2 lines for this user
- Open the KCS TCFW client
- Open the user profiles using the menu option Admin - User profiles...
- If the user profiles open, select from the drop down box Address view instead of User view
- Now you get the list with several columns and you can set filters on any of those columns by doubleclicking the empty column line located above the column description.
A new "Current Search Criteria:" dialog window opens and there you can enter a filter string for the specified column. The list contains the following columns
Service, Address, Full name, Short name, Company, Department, Active
- Use the menu option Folder - Export Fields, select a filename and the list will be saved into the specified file in tabulator-delimited format
- Standard functionality of the KCS TCFW client
- All addresses defined for a specific user are exported, even if the users has assigned multiple addresses of the same service (e.g. multiple FXI addresses)
- Filters can be applied before the export is started
- The export is hardcoded limited to the columns mentioned above, so the list of exported properties is not customizable
- Multiple lines for each address of a user, so the export is not a single line per user, but a single line per user address.
Method 2: Exporting KCS user settings with the TFC based script "KCSExportUserList.vbs"
- Copy the attached KCSExportUserList.vbs to a machine where the TCfW Communication Server Client (KCS Client) is installed.
- The script uses the VBScript scripting host (available on all Windows machines), TFC.DLL with depended modules (TCSI32.DLL, TCLIB32.DLL,...) and the TCFW Login control (TCLogin.ocx)
- It requires a KCS TCFW license for login into KCS
- Optional step: Modify the list of exported User addresses
- Open the KCSExportUserList.vbs with any editor like Notepad
- On top of the script you see an Array named Addresses with 6 elements and just below a list of Services
Addresses(0) = "TOPCALL"
Addresses(1) = "FXI"
Addresses(2) = "MX7"
Addresses(3) = "VOICE"
Addresses(4) = "NOTES"
Addresses(5) = "SMTP"
- You can add an additional Service, e.g.
Addresses(6) = "TCFI"
but then you must also change the size of the Array by increasing the value within brackets of the Dim line,
- You can also change the existing service names according to your needs.
- But as a general rule, all service names must be entered in capital characters
- After applying the changes, save the file
- Doubleclick the VBS file to execute the script.
On a 64-bit operating system the script will automatically start the script with the 32-bit scripting host. This is necessary because also TFC.DLL is only available as 32-bit DLL.
- A popup dialog opens asking for the filename where the export should be saved, default value is the file name KCSExportUserList.csv located in the same folder from where the VBS script was started. But you can also specify a full path to a file name, e.g. C:\Temp\UserList.cvs
- Afterwards you see the standard KCS TCFW Login dialog
If multiple servers are configured select the corresponding KCS Server from the dropdown list.
Login with an administrative user (e.g. TCTECH), who has the rights to read the System user profiles and the System address book
- After clicking OK, the export starts, once the export is finished you get a confirmation box, how many users have been exported, e.g.
158 User(s) exported to 'd:\temp\UserList.txt'
- The userlist contains the columns listed below, the columns named Address:xxxx are automatically adopted according to the list of services defined on top of the script (see optional step explained above)
- The column LinkGroup (TS_CORREL_3) is interesting for users created via Dirsync, it shows the LinkGroup setting of those link instance, which created the user.
- After the list of addresses of a predefined services you get a list of all addresses defined for each user. For each addresss you get the Active/Inactive state, the used service and the used number in separate columns
- The Default template, if defined for a user, is show in the format folder/filename, e.g. TCLINK/DEFTEMP
- The available columns are:
UserID Salutation Fullname Department Company FreeText Representative Group Location Language Timezone Costcenter DirsycAllowed UserBelongsTo LinkGroup (TS_CORREL_3) DefaultTemplate VisibleInOutbox Address:TOPCALL Address:FXI Address:MX7 Address:VOICE Address:NOTES Address:SMTP Address(1) - Active Address(1) - Service Address(1) - Number Address(2) - Active Address(2) - Service Address(2) - Number .... Address(9) - Active Address(9) - Service Address(9) - Number
- Once the export is finished, Load the exported file into Excel (Data - From Text) and apply any filters or sorting
- By default more information (compared to Method 1) is available for every user, e.g.
Freetext, Representative, Group, Location, Language, Timezone, VisibleInOutbox-Setting, Costcenter, Dirsync settings, Default template,...
- Customizable script, list of services can be easily modified
- Any other additional User properties can be easily added with some knowledge of TFC
- Exported file contains one line for each user and not one line for each address of a specific user.
- No standard functionality, script must be copied to the machine.
Level of Complexity
|KCS Client (TCFW)||All||tested with KCS 10.0 and KCS 10.1|
Keywords: User export, backup, Excel, CSV