Detect when ZPA is connected using powershell and wmi

NOTE: We are using the GOV client and not commercial.
Is there any way to query WMI to determine whether or not ZPA is in a “connected” state? We are currently having login script issues with machines that are connecting through ZPA. We would like to add a do/until statement into our scripts to query the connection and wait until it is in a “connected” or “ON” state before the script runs. Right now, our scripts are very sporadic and mapped drives connect anywhere between 15 - 45 minutes after a user logs into their workstation(s) while telecommuting. Since the UI displays “ON” or “DISABLED”, there has to be a way to query that state using PowerShell

Leon, I am copying my colleague @David Creedy who may be able to answer your question.

Are there any news on this topic? Because we are looking also for a similar solution like that one here in the post or as described in post Login Script/Mapped Drives

Maybe a bit of a dirty hack but how about something like

‘if IP of then ZPA is active’

Here some article how this can be done via WMI

1 Like

This is a good idea.