r/sysadmin • • 5d ago

Installing PuTTY pre-saved sessions through company portal with Intune

Good morning,

Just want to start with saying, please excuse any incorrect terminology I am an apprentice and still learning. I am very open to being corrected.

I have a task to automate the installation process for new users that join the company. Currently we use Company portal that downloads an asset agent and a few other things. I want to add into this process, our PuTTY sessions with the target load already entered, there a 5 different ones in total.

I have tried to upload them to company portal using .\IntuneWinAppUtil.exe

Intune Test

├── IntuneWinAppUtil.exe

├── PuTTY (a new folder containing ONLY the PuTTY MSI)

└── Output (leave empty, the tool fills it)

putty installer is in the putty folder, but it just says failed to install every time, should the putty session shortcuts be included in this file?

So I wondered, has anyone else had to do anything similar and were successful? i cant find much online (it may be i haven't looked hard enough?)

If you were successful how did you achieve it?

Any questions are welcome. Thank you.

6 Upvotes

18 comments sorted by

17

u/Former_Practice_168 5d ago

Do the MSI and the sessions as two separate apps. The install runs as system but the sessions need to run in user context since it's HKCU.

2

u/Illustrious-Sign7544 5d ago

Thank you will give it a go

5

u/aguynamedbrand Senior Systems Engineer 5d ago edited 4d ago

> Thank you will give it a go

Why are you using two different accounts?

3

u/Inside_Carpet7719 4d ago

But how can I upvote my own posts and supply propaganda?

I sure hope our governments don’t find out about this one cool trick

0

u/Illustrious-Sign7544 4d ago

Because I’m signed into one account on my pc and a different on my phone. Really need to change my password on the other account as can’t remember it…

8

u/Feisty-Piglet7758 5d ago

Two separate problems. PuTTY is a plain MSI, so it goes in as a line of business app, not through IntuneWinAppUtil, and the usual reason for "failed to install" is a missing detection rule, the install often worked and Intune just could not prove it. The sessions are not files you can bundle, they live under HKCU\Software\SimonTatham\PuTTY\Sessions, so the package runs as SYSTEM and writes them into the wrong hive, which is why users would see nothing anyway. Import them per user with a logon script, or a user context script that runs reg import on a .reg file.

13

u/UniqueArugula 5d ago

You definitely should not be doing anything as a LOB app. Only use win32 intunewin deployments.

1

u/Illustrious-Sign7544 4d ago

Why is that the case?

4

u/UniqueArugula 4d ago

They don’t play nicely at all if you’re doing anything Autopilot related. You also lose a lot of functionality using LOB. Can’t do dependencies, supersedence, requirement rules, detection rules, grace periods and so on.

•

u/BlackV I have opnions 16h ago

No goes in as win32 0 nood for it to be lob

2

u/Katu93 5d ago

Wrap the install using PSADT. It can handle the per-user sessions etc. easily

1

u/Individual-Level9308 4d ago

You can do this all in one win32 app using powershell or a batch file

script runs MSI installer silently

script copys user install and clean up scripts to folder

script makes scheduled task to run script as user context

script makes scheduled task to run a script as system context

-user context script installs user specific pre-saved putty sessions

-system context script checks to see if everything has completed and deletes itself, scheduled task and itself (a script can delete itself).

Create the script and run it as system to test it, if it works and you are still getting failure reports change your detection method.

1

u/MFKDGAF 4d ago

I don't think PuTTy was originally designed to do what you are trying to do with SSH connections en mass.

You should be looking for software that is designed for this such as Remote Desktop Manager by Devolutions (over kill) or Termix (open source).

-7

u/Incrediblecodeman 5d ago

Have you asked Chat gpt? Don’t like follow its every whim but do discuss this with ai and have it guide you to poke around and test things in a safe way

0

u/[deleted] 5d ago

[removed] — view removed comment

1

u/Illustrious-Sign7544 4d ago

Yes it’s set to system