Powersehll add Pre-Shared Key to Microsoft L2TP VPN

Powersehll add Pre-Shared Key to Microsoft L2TP VPN

avatar

Hello
I tried to add the pre-shared key to a Microsoft VPN RDM-Session.
forum image

It should be there
$session.VPN.MicrosoftVPNSafePresharedKey
but it does not work with:
$system.vpn.MicrosoftVPNSafePresharedKey = "XXXXX".

I found the following with "write the PSK to a custom field":
https://forum.devolutions.net/topics/33404/store-microsoft-vpn-configuration-profile-in-rdm#138180
Is it possible to write it in the psk-field?

RDM Version: 2021.2.29.0
DB Version: v1.750

Best regards
Rolf

All Comments (1)

avatar

Hi,

MicrosoftVPNSafePresharedKey is an encrypted field and can't just be assigned plain text.
Unfortunately, as the PowerShell module could bypass pretty much all security and permissions, we don't give access the the decrypted version by default.
It's on a case by case basis. I'll see what can be done and get back to you.

Regards

Jonathan Lafontaine