Batch edit part of hostname

avatar

I was just wondering if it's possible to update part of a hostname ?

We use a host string to connect to our SSH servers via BeyondTrust and it's in the format of:

<domain>\<userid>@<domain>\<unix userid>@<unix host>@<BT Server>

I just need to bulk update the <BT Server> to a new server

Is this possible with Batch edit ?

If a powershell command is required, could you please supply one, as I'm not too familiar with powershell commands in RDM

I am using the latest Enterprise version


Thanks in advance

All Comments (2)

avatar

Hello,

You can easily do the modification using PowerShell, here is a sample script that you can run from PowerShell (Tools > PowerShell (RDM CmdLet)).

It will retrieve your SSH sessions and change <BT Server> with <New BT Server>.

$sessions = Get-RDMSession | where {$_.ConnectionType -eq "SSHShell"}
foreach($session in $sessions){
    $session.Host = $session.Host.Replace("<BT Server>", "<New BT Server>")
    Set-RDMSession -Session $session
}

Update-RDMui


Best regards,

Richard Boisvert

avatar

Thanks for that Richard ! I'll try that