When installing TeamViewer through SSH please keep in mind there is an EULA agreement which must be accepted before the GUI is able to launch to receive an ID. TeamViewer is now configured to start automatically with Windows.I wrote same question to teamviewer support and got such reply:
To configure TeamViewer to run as a service during installation: The TeamViewer standalone integration only supports unattended connections when the TeamViewer host is commercially licensed.
When TeamViewer is not configured to run as a service on a device, it is reported in the device Summary tab as: Take Control - Existing Installation - Integration Requires "Start With Windows" Set. To keep TeamViewer running continuously on the machine, configure TeamViewer to run as a service during installation or after installation using the TeamViewer options. To ensure connections to the device are constantly available, TeamViewer must be running continuously on the machine.