Creating Putty Session

Creating Putty Session

avatar

Here is the code that I am using to import my CSV file with the intention of creating multiple putty sessions however what is getting created is a "SSH shell" connection


cls;
$PSDefaultParameterValues['Set-RDM-Property:NoRefresh']=$true

$csv = Import-Csv $args[0];
Write-Host;

foreach ($connection in $csv)
{
Write-Host ("Importing : " + $connection.DataCenter + "-" + $connection.Name);
Write-Host;
#1
$session = New-RDM-Session -Name $connection.Name -Group "HMS Servers\"+$connection.DataCenter -Kind "Putty"
Set-RDM-Session $session -NoRefresh
Set-RDM-Property $session.ID -Path Putty -Property UseSession -Value false
Set-RDM-Property $session.ID -Path Putty -Property Host -Value $connection.IPAddress
Set-RDM-Property $session.ID -Path Putty -Property ProtocolType -Value SSH
}

All Comments (2)

avatar

Hi Douglas,
You need to set the SubMode to 0

Set-RDM-Property $session.ID -Property SubMode -Value 0

fixed the typo
edited by stefane on 6/2/2014

David Hervieux

avatar

I Am doing it this way:
---- Cde ----
$session=new-RDMSession-Group"folder\path"-Host"IP"-Name"FQDN"-Kind"putty"
$session.putty.Application ="Putty"
$session.Putty.UseSession =$False
$session.SubMode =0
$session.putty.ProtocolType ="ssh"
set-rdmsession$session
Update-RDMUI