When I implemented for Windows and macOS via #BigFix and #Jamf respectively, the command needed to be run as the logged in user.
```
c:\Program Files\Fortinet\FortiClient\FortiESNAC.exe -r|--register <address/invitation> [-p|--port <port>] [-v|--vdom <site>]
c:\Program Files\Fortinet\FortiClient\FortiESNAC.exe -u|--unregister
c:\Program Files\Fortinet\FortiClient\FortiESNAC.exe -d|--details
```
```
/opt/forticlient/epctrl -r|--register <address> [-p|--port ] [-s|--site]
/opt/forticlient/epctrl -c|--cloud <invitation code>
/opt/forticlient/epctrl -u|--unregister
```
```
/Library/Application\ Support/Fortinet/FortiClient/bin/epctrl -r|--register <address> [-p|--port ] [-s|--site]
/Library/Application\ Support/Fortinet/FortiClient/bin/epctrl -c|--cloud <invitation code>
/Library/Application\ Support/Fortinet/FortiClient/bin/epctrl -u|--unregister
```
Extrapolated from Linux commands. Not documented and probably not supported. Registering to and unregistering from a #FortiEMS server worked.