Specialized Administration > Working with Properties and Command Line Utilities > Exporting and Importing Preferences > Exporting Preferences
  
Exporting Preferences
The export utility exports all preference definitions in the system, and allows you to specify the level (site, organization, context, or user) for which you want the preference instances exported. You can also export preference instances for the entire Windchill system (the default), specific clients, specific contexts, or a particular user.
The output file from the export is created in the directory where the utility is run, and is named PreferenceExport_<YYYYMMDD_HHmm>.xml, where <YYYYMMDD_HHmm> is the date and time that the utility is run.
The syntax for the export utility is as follows:
windchill wt.preference.ExportPreferences
The following optional parameters are supported with the export command:
Parameter
Description
-user="<adminID>"
User ID of the site administrator user. This parameter should be specified together with the -password parameter. If these parameters are not specified, then you will be prompted to authenticate when the utility is run.
-password="<adminpassword>"
Password of the site administrator user. This parameter should be specified together with the -user parameter. If these parameters are not specified, then you will be prompted to authenticate when the utility is run.
-usage
Show of all valid parameters for the command.
-debug=<debugLevel>
Control the level of informational or debug messages. 1 is the least, 3 is the most.
-siteLevel
Export all site-level preference instances.
-orgLevel
-orgLevel="<FullPath>"
If specified with no parameter value, all preference instances at the organization level, for all organizations, are exported.
If specified with a parameter value, the preference instances for the specified organization are exported. To specify an organization, the fully qualified name for the organization must be used. Multiple organizations can be specified as a comma-delimited list.
For example, to export all preference instances for an organization named Demo Organization, specify the parameter as follows:
-orgLevel="/wt.inf.container.
OrgContainer=Demo Organization"
If the fully qualified name provided is invalid, an error is logged, and the command exits without exporting anything. If no preference instances exist at the specified level, a message is displayed, but the preference definitions are still exported to the output file.
-containerLevel
-containerLevel="<FullPath>"
If specified with no parameter value, all preferences instances at the context level (product, library, project, and program) are exported.
If specified with a parameter value, the preference instances for the specified contexts are exported. To specify a context, the fully qualified name for the context must be used. Multiple contexts can be specified as a comma-delimited list.
For example, to export all preference instances for a product named Product1 in the Demo Organization, specify the parameter as follows:
-containerLevel="/wt.inf.container.
OrgContainer=Demo Organization/
wt.pdmlink.PDMLinkProduct=
Product1"
If the fully qualified name provided is invalid, an error is logged, and the command exits without exporting anything. If no preference instances exist at the specified level, a message is displayed, but the preference definitions are still exported to the output file.
-userLevel="<userId>"
Exports the preference instances for a comma-delimited list of users. For example, to export all preference instances for the wcadmin and demo users, specify the parameter as follows:
-userLevel=wcadmin,demo
-listClients
Lists all the preference clients, and their internal names. The internal names of the clients are used as the value for the -client parameter.
If any other parameters are specified at the same time as this parameter, then the client list is displayed, but the command does not perform any other action.
-client=<ClientName>
Exports the preference instances for the specified client. The internal name of the client, as displayed in the output for the -listClients parameter, must be specified as the parameter value. Only a single value can be specified for this parameter.
If this parameter is not specified, the preference instances for the Windchill client are exported.
-printEffectiveValues
Outputs the effective preference values for the specified level and client. This parameter must be used in conjunction with one of the level parameters (-siteLevel, -orgLevel, -containerLevel, or -userLevel). If more than one level parameter, or no level parameter has been specified, an error message is displayed, and the command exits without exporting anything.
If the -client parameter is specified, then only the effective values for that client are output. If no client is specified, then the effective values are output for the client WINDCHILL.
When the export command is run with this parameter, the following output file is created instead of the standard output file:
PrefEffectiveValues_
<YYYYMMDD_HHmm>.csv
where <YYYYMMDD_HHmm> is the date and time that the command was run.
* 
Effective values are the preference values in effect at the specified level, whether the preference instances are specified at that level, or are inherited from levels above.
-onlyInstances
Export preference instances only. No preference definitions, preference categories, or preference clients are exported.
-excludeHiddenInstances
Instances of preferences with their visibility set to HIDDEN are not exported.