All Collections
General
Update the Authentication Token via PSExec and start the Pulseway service remotely
Update the Authentication Token via PSExec and start the Pulseway service remotely
Paul Csiki avatar
Written by Paul Csiki
Updated over a week ago

Normally, agents automatically pick up the authentication tokens from the server however in certain cases where you want to migrate from a different Pulseway server or account you will want to update the agent registration information in batches.

To get started you need to configure one system by going through the agent registration dialog and then to open the registry editor and navigate to HKLM:\SOFTWARE\MMSOFT Design\PC Monitor folder. From there we'll copy the AuthenticationToken and AuthenticationTokenCtrl values into the script bellow:

Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name AuthenticationToken -Value "Enter the saved AuthenticationToken from the machine you've just configured"
Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name AuthenticationTokenCtrl -Value "Enter the saved AuthenticationTokenCtrl from the machine you've just configured"
net start "PC Monitor"

You can now either run the script manually on each system using PowerShell or you can make use of PSExec to run the script on remote systems (make sure that you save the script into a file called ReconfigurePulseway.ps1 on the C drive). Make sure that you run the PSExec application as an administrator on your local system.

PSExec \\RemoteMachine01 -i -h -u myUsername -p myPassword PowerShell C:\ReconfigurePulseway.ps1

You can also write a text file called computers.txt which contains the name of computers you wish to run the script on:

PSExec @computers.txt -i -h -u myUsername -p myPassword PowerShell C:\ReconfigurePulseway.ps1

Alternative version:

PSExec @computers.txt -h -u DOMAIN\DomainAdminUser -p myPassword cmd /c "powershell -executionpolicy bypass -noninteractive -file \\server\c$\scripts\ReconfigurePulseway.ps1"

Tip: You can use \\* instead of @computers.txt to run the command on all systems in the active directory. If you don't have an active directory environment you can get a list of systems in the network you can make use of the following command:

net view
Did this answer your question?