Run Putty from PowerShell

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 11 months and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
dragu_stelian
Posts: 4
Last visit: Thu Apr 06, 2023 11:40 am

Run Putty from PowerShell

Post by dragu_stelian »

Hi everyone!
I have question for you.
I made a script in PowerShell to connect to my Ubuntu Server with Putty.
  1. $Path = "C:\Program Files\PuTTY\putty.exe"
  2. $IP = "myIP"
  3. $UserName = "myUserName"
  4. $Password = "myPassword"
  5. $PortNumber = "22"
  6. $Parameters = "-ssh $IP -l $UserName -pw $Password -P $PortNumber"
  7. Start-Process -FilePath $Path -ArgumentList $Parameters
The connection is ok, but I also want when the connection is established to load a specific configuration of window Putty, size, colors, ....
Do you know how to do it ?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Run Putty from PowerShell

Post by jvierra »

Your question should be asked on a Putty forum. It is not a PowerShell issue. As far as I know you cannot dynamically load a Putty configuration. It requires a registry update.
This topic is 11 months and 3 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked