LogicMonitor seeks to disrupt AI landscape with $800M strategic investment at $2.4B valuation to revolutionize data centers.

Learn More

Migrating Windows Collector from Admin to Non-admin User

Last updated on 30 April, 2024

Previously, you could run Windows collectors using administrator (admin) credentials. Later, we extended this support to users with non-administrator (non-admin) credentials to install collectors.

We have now enhanced the migration process to enable users to migrate collectors running under admin user to run under non-admin user without uninstalling collectors or losing any data. You can follow the prompt-based migration process to migrate collectors from admin user to run under non-admin user. To do so, you must run the script Windows_NonAdmin_Config.ps1. The default path is C:\Program Files\LogicMonitor\Agent\bin\Windows_NonAdmin_Config.ps1

Requirements to Migrate Windows Collector

  • User with admin privileges and valid credentials
  • User with non-admin privileges and valid credentials
  • PowerShell version 5 or later
  • EA Collector 35.400 or later installed on your machine

Migrating Windows Collector

To access help, enter the parameter -h after the script Windows_NonAdmin_Config.ps1. The following parameters are displayed.

ParameterDescription
-helpProvides help.
-addMigrates the collector service.
-UserNameProvide name of the non-admin user under whom you want to migrate the collector service.
-PasswordProvide password of the non-admin user.
-PathProvide the path where the collector is installed. By default, the collector is installed at C:\Program Files\LogicMonitor. If the collector is installed at another path, then provide the custom path.

To migrate Windows collector, follow these steps:

  1. Log in to the machine where the collector is already installed with admin credentials.
  2. Open a new Windows PowerShell with admin privileges and go to the Agent\bin folder in the directory where the Windows collector is installed. The default path is C:\Program Files\LogicMonitor\Agent\bin\.
  3. Enter and run the script .\Windows_NonAdmin_Config.ps1 followed by the parameters. The user must be a non-admin user. For example,  .\Windows_NonAdmin_Config -add -UserName LogicMonitor

After you run the script, the Windows collector migrates from the admin to the non-admin user. 10 minutes after the migration is complete, the Collector Status Page on the LogicMonitor portal reflects the role and input user.

Rolling back Migration

If you want to roll back collector from non-admin to admin user, you can run the script rollbackToAdminUser.ps1. The script is available in the Agent\bin folder in the directory where the Windows collector is installed.

Silent Rollback

To access help, enter the parameter -h after the script rollbackToAdminUser.ps1. The following parameters are displayed:

ParameterDescription
-hProvides help.
-qRolls back migration silently.
-uProvide name of the admin user under whom you want to move the collector service.
-pProvide password of the admin user.
-dProvide the path where the collector is installed. By default, the collector is installed at C:\Program Files\LogicMonitor. If the collector is installed at another path, then provide the custom path.

To roll back in silent mode, follow these steps:

  1. Log in to the machine where the collector is installed under a non-admin user.
  2. Open a new Windows PowerShell with admin privileges and go to the Agent\bin folder in the directory where the Windows collector is installed. The default path is C:\Program Files\LogicMonitor\Agent\bin\.
  3. Enter and run the script .\rollbackToAdminUser.ps1 followed by the parameters for silent roll back. The format and sequence is -q -u [admin username] -p [admin password] -d [custom path, if any]. The user must be an existing admin user. For example, .\rollbackToAdminUser.ps1 -q -u Administrator -p password
    After you run the script, the Windows collector rolls back to the admin user. 

Prompt-based Rollback

  1. Log in to the machine where the collector is installed under a non-admin user.
  2. Open a new Windows PowerShell with admin privileges and go to the Agent\bin folder in the directory where the Windows collector is installed. The default path is C:\Program Files\LogicMonitor\Agent\bin\.
  3. Enter and run the script .\rollbackToAdminUser.ps1.
  4. Enter the credentials of an existing admin user.
  5. Enter the directory in which the collector is installed. By default, the collector is located at C:\Program Files\LogicMonitor.
  6. Press enter for the default path. If the collector is located at another directory, then specify the custom path.

After you run the script, the Windows collector rolls back to the admin user. 

Verifying Migration

To verify if the collector has successfully migrated from admin to non-admin user or rolled back to the admin user, perform the following steps 10 minutes after the migration is complete.

  1. In LogicMonitor, navigate to Collectors and search for the collector ID that you migrated to a non-admin user or rolled back to an admin user.
  2. In the Manage column corresponding to the specific collector, select the Settings icon. The Manage Collector dialog box is displayed. 
  3. Select the Support dropdown and then select Collector Status.
  4. Verify the role and user under Basic Information.
In This Article