You will have to create a local script on the gateway first and then call it from management using cprid.
Here's the script content, here you define the sources that will allow you executing CP commands remotely including vsenv
#!/bin/bash
source /opt/CPshrd-R80/tmp/.CPprofile.sh
source /opt/CPsuite-R80/fw1/scripts/vsenv.sh
vsenv 6 2>&1 > /dev/null
pep s p a
save it as file, for example in admin directory as test.sh, then add execute permissions
chmod +x /home/admin/test.sh
Then you can call it using cprid
$CPDIR/bin/cprid_util -server 10.1.1.1 -verbose rexec -rcmd bash -c /home/admin/test.sh
Context is set to Virtual Device vsx1_vs-ext (ID 6).
Command: root->show->pdp->all
Source IP ID Connect time Users
=========================================================
127.0.0.1 0x0 13Oct2018 19:34:00 24030