Automation script for parameters configuration

Thinfinity® Remote Workspace Agent allows you to add the parameters required to register that component into a Thinfinity Workspace solution. When you create a Virtual Machine, you will need to add the following script (in the Custom Data ) codified into base 64 in your custom data:

{
  "thinfinity": {
    "networkId": "networkId",
    "gatewayUrls": [
        "GatewayURL"
         ],
    "agent": {
    "remoteId": "{COMPUTERNAME}@{IPAddress}"
     }
   }
}

NetworkId: your deployment's network IDGateway URL: your gateway/s URL Computername: it takes the name and the IP from the ComputerThe format of the JSON file which can be passed as custom data, user data, or as an argument to any of the binaries, is as follows:

{
	"thinfinity": {
		"binding": [
			{
				"https": true,
				"ip": "",
				"port": 443,
				"hostName": "127-0-0-1.thinrdp.net",
				"certificateStore": "MY",
				"thumbprint": "ab-cd-ef-gh-ij-kl",
				"redirectUrl": "",
				"redirectCode": 0
			},
			{
				"https": false,
				"ip": "",
				"port": 80,
				"hostName": "127-0-0-1.thinrdp.net",
				"redirectUrl": "https://127-0-0-1.thinrdp.net/",
				"redirectCode": 302
			}
		],
		"networkId": "set-by-a-script-file",
		"gatewayUrls": [
			"https://127-0-0-1.thinrdp.net/",
			"https://25-95-118-105.thinrdp.net/"
		],
		"commGatewayUrls": [
			"http://25.87.240.213:8443/",
			"http://25.87.240.214:8443/"
		],
		"apiKey": "this-is-my-apikey",
		"protection": {
			"bruteForce": {
				"enabled": true,
				"maxAttempts": 3,
				"minutesToReset": 10
			},
			"whiteList": [
				"192.168.1.*"
			],
			"blackList": [
				"192.168.2.*"
			]
		},
		"broker": {
			"accessKey": "{InstanceID}-{ComputerName}",
			"master": false,
			"poolName": "Batch-Pool"
		},
		"agent": {
			"remoteId": "{InstanceID}-{ComputerName}",
			"password": "scripted-agent-password"
		},
		"vnc": {
			"remoteId": "{InstanceID}-{ComputerName}",
			"password": "scripted-vnc-password",
			"options": {
				"enableLanWanAccess": true,
				"certificate": {
					"certificateFile": "",
					"rootCAFile": "",
					"privateKeyFile": "",
					"passPhrase": ""
				},
				"vnc": true,
				"ft": true
			},
			"authentication": {
				"name": "None",
				"username": "",
				"password": "",
				"ntlmUsers": ""
			},
			"permissions": {
				"view": {
					"prompt": true,
					"promptSecsTimeout": 5,
					"inactivityMinsTimeout": 10,
					"allowOnPromptTimeout": true
				},
				"control": {
					"prompt": true,
					"promptSecsTimeout": 5,
					"inactivityMinsTimeout": 10,
					"allowOnPromptTimeout": true
				}
			},
			"protection": {
				"level": 0,
				"password": ""
			}
		}
	}
}

In case of using the setup by command line, you have to call the executable in one of the following ways:

  1. /SetInstance “C:\Thinfinity-config-JSON-Path\Thinfinity.json“

  2. /SetInstance json-element-1-path=element-1-value … json-element-N-path=element-N-value

Examples:

  • /SetInstance network.id=my-secret-network-id “gatewayUrls=https://gw1.domain.com;https://gw2.domain.com” binding.https=false binding.port:8080

In this case, you can also add one binding. Instead, using a file, you can add more than one since it is an array of bindings.

  • /SetInstance network.id=my-secret-network-id “gatewayUrls=https://gw1.domain.com” broker.id={InstanceID} broker.master=false broker.poolName=PrivatePool-1

This sets the broker as secondary and named PrivatePool-1, connecting to the gw1.domain.com gateway using the networkID my-secret-network-id

Last updated