Migrating Windows Collector from Admin to Non-admin User
Last updated on 30 April, 2024Previously, 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.
Parameter | Description |
-help | Provides help. |
-add | Migrates the collector service. |
-UserName | Provide name of the non-admin user under whom you want to migrate the collector service. |
-Password | Provide password of the non-admin user. |
-Path | Provide 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:
- Log in to the machine where the collector is already installed with admin credentials.
- 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\.
- 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:
Parameter | Description |
-h | Provides help. |
-q | Rolls back migration silently. |
-u | Provide name of the admin user under whom you want to move the collector service. |
-p | Provide password of the admin user. |
-d | Provide 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:
- Log in to the machine where the collector is installed under a non-admin user.
- 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\.
- 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
- Log in to the machine where the collector is installed under a non-admin user.
- 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\.
- Enter and run the script
.\rollbackToAdminUser.ps1
. - Enter the credentials of an existing admin user.
- Enter the directory in which the collector is installed. By default, the collector is located at C:\Program Files\LogicMonitor.
- 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.
- 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.
- In the Manage column corresponding to the specific collector, select the Settings icon. The Manage Collector dialog box is displayed.
- Select the Support dropdown and then select Collector Status.
- Verify the role and user under Basic Information.