Policy help

Valued Contributor II

I noticed for some reason most of our policies and scripts and software pushes/apple updates don't work well over VPN. So want I was thinking, at least in terms of apple updates, is to create a smart group that looks at when a user is on VPN, and then a Policy that is scoped to that to say if you're on VPN, then Run:

jamf removeSWUSettings; softwareupdate -l; jamf recon

My thought process is that if it resets to Apple Servers, when the user logs off their machine the updates will come down from Apple and patch properly. The jamf recon is to update the JSS to put them in the group that should install updates.

any reason that won't work in theory, can I string together commands like that?