{"id":57600,"date":"2021-12-15T10:09:17","date_gmt":"2021-12-15T15:09:17","guid":{"rendered":"https:\/\/jumpcloud.com\/?p=57600"},"modified":"2022-05-11T10:43:51","modified_gmt":"2022-05-11T14:43:51","slug":"installing-jumpcloud-agent-how-to-acquire-a-secret-key-within-powershell","status":"publish","type":"post","link":"https:\/\/jumpcloud.com\/blog\/installing-jumpcloud-agent-how-to-acquire-a-secret-key-within-powershell","title":{"rendered":"Installing JumpCloud Agent: How to Acquire A Secret Key Within Powershell"},"content":{"rendered":"\n
Editor’s note: This tutorial was originally posted by Juergen Klaassen on his <\/em>LinkedIn page<\/em><\/a>.<\/em><\/p>\n\n\n\n I was looking for a secure option to acquire the connect key for the JumpCloud agent<\/a> during a Task Sequence with MDT<\/a> while imaging a Windows 10\/11 with a custom ISO.<\/p>\n\n\n\n During the Task Sequence<\/a>, the JumpCloud agent installer requires a connect key which needs to be passed as a parameter. As I don’t want to hardcode or store the connect key anywhere on the image within scripts or by using half-baked obfuscation techniques, I needed an approach which allows me to authenticate as an authorized administrator (or user).<\/p>\n\n\n\n There were of course several approaches to it. A simple one could have been to halt the Task Sequence, login to the JumpCloud Console, copy the key, and then paste it over to the installer and proceed – too many clicks and a little cumbersome as well because the Task Sequence is usually running in a low resolution. I considered options like password-protecting the installer including the connect key, but these methods are rather antiquated and do seldom cater for similar scenarios on deployed and provisioned systems as they often trigger false positives with EDR-solutions in place. I had to do some more research and start exploring vaulting solutions such as Vault by Hashicorp<\/a>, AWS Secrets Manager<\/a> or Azure Key Vault<\/a>. All were considered here as they do have Powershell-modules available<\/a>. I did choose Azure Key Vault as I didn’t have to sign-up for anything new and I’m using Azure for other purposes as well.<\/p>\n\n\n\nChallenge:<\/h2>\n\n\n\n
Requirements:<\/h2>\n\n\n\n