How to migrate proVconnect Agent DNS

How to migrate proVconnect Agent DNS

Migrating proVconnect agents to an other DNS can involve risks.

First of all, make sure you own the new DNS.

After agent is migrated to a wrong DNS, the only solution to get back agents is manually update the configuration file on each lost agent.

1 - Checks

The migration to an other DNS is very simple, but some checks must be done before:

I own the new DNS
I have a valid certificate for the new DNS

2 - Create the migration commands

Only two - or three if you want check the configuration file has been successfully updated with the new DNS - commands are required to migrate a proVconnect agent to a new DNS.

1 - Update the configuration file

Firstly, the new DNS must be set in the configuration file.

So, create a new launch command, and use the following command (replace XXXXXXXXXXXXX:XXXX by the new DNS you want):

powershell -command "$file='Wanpulse.config';(Get-Content $file) -replace 'value=\"https://[^^\"]*\"', 'value=\"https://XXXXXXXXXXXXX:XXXX\"' ^| Set-Content $file"

To migrate a proVconnect agent to target-dns.com, the command will look like to:

powershell -command "$file='Wanpulse.config';(Get-Content $file) -replace 'value=\"https://[^^\"]*\"', 'value=\"https://target-dns.com\"' ^| Set-Content $file"

2 - Check the configuration file (Optionnal)

You can check if the configuration file has been successfully updated with the wanted new DNS.
So, create a new launch command, and use the following command (replace XXXXXXXXXXXXX:XXXX by the DNS you want to check):

powershell -Command "$content = Get-Content 'Wanpulse.config' -Raw; if ($content -match 'value=\"(https://[^^\"]*)\"') { if ($matches[1] -eq \"https://XXXXXXXXXXXXX:XXXX\") { exit 0; } else { throw \"Not expected DNS found\" } } else { exit 1; }"

To migrate a proVconnect agent to target-dns.com, the command will look like to:

powershell -Command "$content = Get-Content 'Wanpulse.config' -Raw; if ($content -match 'value=\"(https://[^^\"]*)\"') { if ($matches[1] -eq \"https://target-dns.com\") { exit 0; } else { throw \"Not expected DNS found\" } } else { exit 1; }"

3 - Restart the proVconnect agent

To finish, the proVconnect agent must be restarted to use the new DNS.
So, create a new launch command, and use the following command:

proVconnect.Tools.AgentRestarter.exe

3 - Deploy the created task

Now the three commands are ready, you can deply the migration task to the agents you want.

For more security, you can link the second and the third command to skip the restart of the agent if the configuration file is not configured with the DNS you want.

image-20251009-132448.png

The proVconnect agent will take the DNS set in the configuration file when it restart, so if a wrong DNS is set, you will send your proVconnect agent to the wrong DNS.

So it does not keep you safe if the device is restarted with a wrong DNS set in the configuration file.