If you have an enterprise subscription, computers can be joined to the cloud from the command line or via a script using cloud-join tokens. Computers can also be added to groups using cloud-join tokens if you need to restrict discovery of the computer to certain members of the team.
Generating a cloud-join token
Cloud-join tokens can be found under the Deployment page of your RealVNC account. To generate a new cloud-join token use the generate token button.
Then select how long the token will be valid for - either one hour or indefinitely. The token will then be generated and will appear in the token column of the table.
Once generated the token can then be applied either by using the command line or via a batch file.
Deploying a cloud-join token
Please note that <TOKEN> should be replaced with the token you generated in the Deployment page of your RealVNC Account for both deployment options
To add a computer to a group using a token the option -joinGroup <GROUP> must be added to the end of your command or in the second line of your batch file. Please replace <GROUP> with the name of the group the computer should be added to. Group names can be referenced from the Computers page of your RealVNC account.
All command line deployment options must be run from an administrator command prompt in Windows operating systems to work correctly.
"%programfiles%\RealVNC\VNC Server\vncserver.exe" -service -joinCloud <TOKEN>
sudo /library/vnc/vncserver -service -joinCloud <TOKEN>
sudo vncserver-x11 -service -joinCloud <TOKEN>
To deploy a cloud-join token using a batch file please create a new batch file with the following contents:
cd /d"%programfiles%\RealVNC\VNC Server"
vncserver.exe -serivce -joinCloud <TOKEN>
echo Joined to cloud team >c:\added.txt
If you need to add a computer to a group using a batch file replace the second line of the batch file with the following:
vncserver.exe -service -joinCloud <TOKEN> -joinGroup <GROUP>