# PowerShell script for launch Putty

**URL:** <https://forums.powershell.org/t/powershell-script-for-launch-putty/22084>\
**Category:** PowerShell Help\
**Created:** [April 8, 2023, 5:37pm UTC](https://forums.powershell.org/t/powershell-script-for-launch-putty/22084 "2023-04-08T17:37:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dragu\_stelian](https://avatars.discourse-cdn.com/v4/letter/d/ecd19e/32.png) [@dragu\_stelian](https://forums.powershell.org/u/dragu_stelian)\
**Post date:** [April 8, 2023, 5:37pm UTC](https://forums.powershell.org/t/powershell-script-for-launch-putty/22084/1 "2023-04-08T17:37:36Z")

</div>

Hi everyone!  
I have question for you.  
I made a script in PowerShell to connect to my Ubuntu Server with Putty.

> $Path = “C:\Program Files\PuTTY\putty.exe”
> 
> $IP = “myIP”  
> $UserName = “myUserName”  
> $Password = “myPassword”  
> $PortNumber = “22”
> 
> $Parameters = “-ssh $IP -l $UserName -pw $Password -P $PortNumber”  
> Start-Process -FilePath $Path -ArgumentList $Parameters

The connection is ok, but I also want when the connection si established to load a specific configuration of window Putty, size, colors, font, …  
Do you know how to do it ?

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [April 8, 2023, 8:57pm UTC](https://forums.powershell.org/t/powershell-script-for-launch-putty/22084/2 "2023-04-08T20:57:08Z")

</div>

dragu\_stelian,  
Welcome to the forum. 👋🏼

If I got it right - why don’t you save a session with the desired settings and load it later on with the command line option `-load`?

[https://the.earth.li/~sgtatham/putty/0.78/htmldoc/Chapter3.html#using-cmdline](https://the.earth.li/~sgtatham/putty/0.78/htmldoc/Chapter3.html#using-cmdline)

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:15pm UTC](https://forums.powershell.org/t/powershell-script-for-launch-putty/22084/3 "2024-05-16T20:15:02Z")

</div>

Closed on May 16, 2024, 8:15pm UTC


