Updating ThingWorx AppKeys > For Windows > Update a ThingWorx AppKey for Analytics Server – Scripted Process
Update a ThingWorx AppKey for Analytics Server – Scripted Process
When you need a new ThingWorx AppKey, use the procedure below to update and encrypt the key. This scripted process is available on for Analytics Server version 8.4.4 or later. If you are using an earlier version, a manual process is available to encrypt the new key. For more information, see Update a ThingWorx AppKey – Manual Process.
1. Log into ThingWorx Composer, as an Administrator, and create a new AppKey. For more information, see the Application Keys section of the ThingWorx Help Center.
The Application Key you provide to ThingWorx Analytics must be a key assigned to a user with Administrator privileges. After installation, the Application Key can be reassigned to a non-administrator user who has the appropriate permissions. See ThingWorx Application Key Permission Levels.
The same key can be used for both Analytics Server and Platform Analytics.
2. On the Windows computer where your ThingWorx Analytics is installed, open the Windows PowerShell, or a Command Prompt, in Administrator mode and navigate to the bin directory:
C:\Program Files (x86)\ThingWorxAnalytics\Thingworx_Analytics_Server\bin
3. Execute the following command to run a script that will update the encryption of your new AppKey:
update-encrypted-password.bat t <new AppKey>
A message is displayed when the encryption process is complete and the command prompt returns.
4. Do one of the following to restart the ThingWorx Analytics services:
From the installation bin directory, run the following command: .\twas.ps1 restart.
From the Windows Start menu, navigate to ThingWorx Analytics Server, right-click on the Restart option, and select Run As Administrator.
It might take several seconds for the Things in ThingWorx to refresh and reconnect.
Was this helpful?