I have not tried this with VPN ...
If Systems Manager is install you can have group policy dynamically assigned based on the state of things like antivirus. However it normally does not rectify or update itself very quickly.
Some sample screenshots ("block gambing" is a test policy we use - as well, it is easy to test things but not get in the way of normal business):