PS Script as Win32app to Install VPN Detection Issue!

Hello all, initiatory post here as I am really stuck. I have a PS1 that I am deploying via Win32app. Script Installs our VPN just fine, the Problem is the Detection side of things. I did a Dirty detect by having it create a blank txt file which intune detects hit or miss. We are using the Windows default VPN client in settings to connect. How would you‏‏‎‏‏‎‏‏‎‏‏‎­go about creating a detection for the install? I tried using a Registry Entry in HKLM and works just fine for AAD devices but fails on Hybrid devices. I am stuck and appreciate any help.

We just run ours as a script rather than an app, especially because, as you said, the PowerShell works.

It’s a long shot, but if it’s a Windows VPN Client, you might be able to use this and get some data out and then validate it against it.

Normally using the uninstall string for the soft ware is the recommended way to detect for installs. Have you checked the intune management extension logs for why it’s failing on certain devices? If it’s a VPN client that auto establishes a connection on install then a custom detection rule should be used if your trying detect whether it installed properly AND established a connection, but even that would be janky. In my environment we use the uninstall strings or a custom detection rule (check if the service/process is running).

If it’s a native Windows VPN Connection does it show up with Get-VPNConnection?

Are you waiting for the VPN install to finish?

How do you deploy the script to New devices?

If you target a group or all devices it will run as the device comes online after AutoPilot.

Hey not do raise a dead thread - be careful doing this. The intune log reports will actually have the entire PS script in plain text there. As in if you’re using a secret key and not using a certificate it will be visible to the end user.