ThingWorx Analytics Installation > ThingWorx Analytics Windows Installation > Installation Procedure - Windows > Change the User Account
  
Change the User Account
When ThingWorx Analytics functionality is installed, the default Windows Network Service account is automatically used by the ThingWorx Analytics Server and the Descriptive Analytics Microservice when running local services. However, an advanced option is available to override the default account and specify a different user account.
Update Permissions
The default account can only be overridden with another user account that already exists in the system. Before running the command to change the service user account, update the permissions on the existing account you intend to use.
1. Open the Windows Explorer and navigate to the ThingWorxAnalytics installation directory.
2. Right click the installation directory and select Properties. A Properties dialog box opens.
3. Open the Security tab and click Edit. A Permissions dialog box opens..
4. Click Add to add a user to the permissions for the installation directory. A Select Users or Groups dialog box opens.
5. In the field at the bottom of the dialog box, enter the name of the user account you want to assign permissions to and click Check Names. The system verifies that the user exists and adds the domain name (if applicable).
6. Click OK. The selected user name is added to the list of users with permissions to the installation directory.
7. In the list, select the newly-added user and in the permissions for that user below, on the Full Control row, select the Allow check box.
8. Click OK to close the Permissions dialog box and redisplay the Properties dialog box.
9. Because the installation directory includes subdirectories that also need the same permissions, click Advanced. The Advanced Security Settings dialog box opens.
10. Click the check box at the bottom of the dialog box: Replace all child object permission entries with inheritable permission entries from this object.
11. Click OK to save the settings and close the dialog box.
12. Click OK to close the Properties dialog box.
Override the Network Services User Account
To override the default services user account, follow the steps below for either ThingWorx Analytics Server or Descriptive Analytics. To change the default account for both components, run the procedure individually for each component.
1. Open the Windows PowerShell, or a Command Prompt, in Administrator mode.
2. Navigate to the bin folder of either the ThingWorx Analytics Server or the Descriptive Analytics installation directory.
Examples:
C:\Program Files (x86)\ThingWorxAnalytics\Thingworx_Analytics_Server\bin
C:\Program Files (x86)\ThingWorxAnalytics\DescriptiveAnalytics\bin
3. Execute one of the following commands:
In Windows PowerShell: .\changeServiceUserAccount.ps1
In Command Prompt: powershell -executionPolicy bypass -file "changeServiceUserAccount.ps1"
A Credential Request dialog box opens.
4. Enter a User Name (or a domain/user name combination) and a Password in the respective fields. The new account can only be created for a user that already exists in the system.
5. Click OK.
The system authenticates the user account and updates the relevant services to run as the authenticated user.
6. To check the updated user for a service:
Navigate to the local services on your computer. The path to these services will vary based on your version of Windows. (Example: Administrative Tools > Services)
Check the value in the Log On As column for affected services. Instead of Network Service, you should now see the new user account. Affected services can include:
for ThingWorx Analytics Server – local services that start with twas
for Descriptive Analyticsdescriptive-analytics-service