Search and Replace part of the URL of Web Browser sessions

Search and Replace part of the URL of Web Browser sessions

avatar

Recently a web site resource in the company got moved to a different location, meaning a part of the URL changed.
Unfortunately I have a vast amount of Web Browser sessions linking to various documents located on the resource that got moved.
So now I'm looking for a convenient way to do a simple Search&Replace operation on all Web Browser sessions which would replace the matching part of the old URL ( "/406/" ) with the updated one ( "/723/" ).
Is there any way to do this in RDM? If not I'd also be thankful about some advice on the SQL statement which might do that job.

Kind regards
Holger

-------------------
Remote Desktop Manager Enterprise Edition 12.6.6.0 64 Bit - Data Source: SQL Server
Running on Windows Server 2012R2 VMs with Remote Desktop Services feature, serving as common work environment for 30 Windows Server administrators

All Comments (4)

avatar

Hello,

Does the beginning and the end part of the website is the same for all the entries?

Could you provide us an example please.

Best regards,

Jeff Dagenais

avatar

-------------------
Remote Desktop Manager Enterprise Edition 12.6.6.0 64 Bit - Data Source: SQL Server
Running on Windows Server 2012R2 VMs with Remote Desktop Services feature, serving as common work environment for 30 Windows Server administrators

avatar

Hello,

Thank you for the explanation.

This would be possible using a little PowerShell script. I suggest you to test it on 1 or 2 sessions to begin and the rest after just to be sure that the script is working properly. Select your web browser session and click on Edit -> Batch Edit -> Batch Actions -> Custom PowerShell Command and paste the following script.
$connection.WebBrowserURL = $connection.WebBrowserURL.Replace("/406/", "/723/");
$RDM.Save();Just replace the /406/ and /723/ with %2F406%2F and %2F723%2F to do a second search and replace.

Best regards,

Érica Poirier

avatar

Thanks Erica, worked like a charm and is a big time saver for similar tasks :)

-------------------
Remote Desktop Manager Enterprise Edition 12.6.6.0 64 Bit - Data Source: SQL Server
Running on Windows Server 2012R2 VMs with Remote Desktop Services feature, serving as common work environment for 30 Windows Server administrators