embed a username and password when configuring a VPN with PowerShell

%3CLINGO-SUB%20id%3D%22lingo-sub-1740224%22%20slang%3D%22en-US%22%3Eembed%20a%20username%20and%20password%20when%20configuring%20a%20VPN%20with%20PowerShell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1740224%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3E%3CSPAN%3EHello%2C%20good%20morning%20community%2C%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3EIs%20there%20a%20way%20to%20embed%20a%20username%20and%20password%20when%20configuring%20a%20VPN%20with%20PowerShell%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EI%20am%20using%20the%20command%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EAdd-VpnConnection%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EIn%20this%20case%2C%20I%20dont%20want%20to%20use%20UseWinlogonCredential%20as%20I%20need%20to%20use%20a%20service%20user%20to%20authenticate%20to%20the%20VPN.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20hope%20you%20can%20help%20me.%3CBR%20%2F%3E%3CBR%20%2F%3Ethanks%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hello, good morning community,

Is there a way to embed a username and password when configuring a VPN with PowerShell?

I am using the command

Add-VpnConnection

In this case, I dont want to use UseWinlogonCredential as I need to use a service user to authenticate to the VPN.

I hope you can help me.

thanks

0 Replies