Recommended scripts - 3/6 (Legacy) - TeamViewer Support
<main>
<article class="userContent">
<p>To deploy TeamViewer successfully on your devices, we recommend using specific scripts.</p><p>In this article, we will show you two different scripts we recommend using and explain the meaning of each parameter.</p><div class="blockquote"><div class="blockquote-content"><p class="blockquote-line"><em>This article applies to </em><a href="unsafe:about:blank" rel="nofollow noreferrer ugc"><em>Corporate</em></a><em> and </em><a href="https://www.teamviewer.com/teamviewer-tensor/" rel="nofollow noreferrer ugc"><em>Tensor</em></a><em> license holders who want to deploy TeamViewer (14 or newer) on their Windows devices.</em></p></div></div><p><br></p><h3></h3><h2 data-id="recommended-scripts">Recommended scripts</h2><p>⚠ <strong>Important note</strong>: Please make sure to <strong>replace xxxxxx with the values </strong>that you kept safe after <a href="https://community.teamviewer.com/English/kb/articles/109280-deploy-teamviewer-on-windows-2-5" rel="nofollow noreferrer ugc">creating your custom module</a><strong> </strong>as discussed here:<strong> </strong><a href="https://community.teamviewer.com/English/kb/articles/109280-deploy-teamviewer-on-windows-2-6" rel="nofollow noreferrer ugc">Deploy TeamViewer on Windows - 2/6 </a></p><p><br></p><h3 data-id="-1"></h3><h2 data-id="script-1">Script #1</h2><p>This script processes the deployment all at once.</p><pre class="code codeBlock" spellcheck="false" tabindex="0">msiexec.exe /i "Path_to\TeamViewer_Host.msi" /qn APITOKEN=xxxxxx CUSTOMCONFIGID=xxxxxx ASSIGNMENTOPTIONS="--alias %ComputerName% --grant-easy-access --group-id gxxxxxx"
</pre><p><br></p><h3 data-id="-2"></h3><h2 data-id="script-2">Script #2</h2><p>This script processes the deployment in two steps:</p><ol><li>Installation of the package</li><li>Account assignment</li></ol><pre class="code codeBlock" spellcheck="false" tabindex="0">msiexec.exe /i "Path\To\TeamViewer_Host.msi" /qn CUSTOMCONFIGID=xxxxxx
ping -n 31 127.0.0.1>nul
"Path\To\TeamViewer.exe" assign --api-token xxxxxx --grant-easy-access --group-id gxxxxxx
</pre><p><br></p><h3 data-id="-3"></h3><h2 data-id="main-parameters">Main parameters</h2><p>We will explain here the parameters we used in our recommended scripts:</p><h3 data-id="msiexec.exe-i"><strong>▹msiexec.exe /i</strong></h3><p>Installs the package.</p><p><br></p><h3 data-id="qn"><strong>▹/qn</strong></h3><p>Allows the silent installation.</p><p><br></p><h3 data-id="%22path_toteamviewer_host.msi%22">▹"<strong>Path_to\TeamViewer_Host.msi</strong>"</h3><p>Defines the installation path.</p><p>📌<strong>Note:</strong> It can also be on a network path.</p><p><br></p><h3 data-id="customconfigidxxxxxx"><strong>▹CUSTOMCONFIGID=xxxxxx</strong></h3><p>Applies your module's customization.</p><p><br></p><h3 data-id="apitokenxxxxxx"><strong>▹APITOKEN=xxxxxx</strong> </h3><p>Allows the Account Assignment.</p><p><br></p><h3 data-id="settingsfile%22yourpathyourfilename.tvopt%22"><strong>▹SETTINGSFILE=</strong>"<strong>YOURPATH\yourfilename.tvopt</strong>"</h3><p>Applies the settings you have exported.</p><p>For more information, please read the following article:</p><h4 data-id="export-settings-for-host-deployment">📄 <a href="https://community.teamviewer.com/English/kb/articles/16469-export-settings-for-host-deployment" rel="nofollow noreferrer ugc">Export settings for Host deployment</a></h4><p><br></p><h3 data-id="assignmentoptions"><strong>▹ASSIGNMENTOPTIONS=</strong></h3><p>A variety of options can be added to your deployment. Please see <a href="https://community.teamviewer.com/English/kb/articles/109284-assignment-options-5-6" rel="nofollow noreferrer ugc">Assignment options - 5/6</a> for more information.</p><p><br></p><h3 data-id="-grant-easy-access">▹ --grant-easy-access</h3><p>If you set this option, easy access is granted after the assignment (same as the "Grant easy access" option in the Security tab of the TeamViewer options).</p><p><br></p><h3 data-id="-group-id-id">▹--group-id <ID></h3><p>This option is an alternative to using the --group parameter if the group's ID is known. This might be useful in very large customer environments as it speeds up the assignment process. Usually, using --group is sufficient.</p><p><strong>📌Note: </strong>You can find the group-id when logging into the <a href="https://login.teamviewer.com/?_ga=2.15214774.166299725.1651154467-755542654.1651154467" rel="nofollow noreferrer ugc">Management Console</a>, clicking on the <strong>desired group</strong>, and checking the <strong>URL</strong>. At the end of the URL, you will find "g/123456789"</p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/9AF3HKSHA5NQ/image.png" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/9AF3HKSHA5NQ/image.png" alt="image.png" height="300" width="699" loading="lazy" data-display-size="large" data-float="none" srcset="https://us.v-cdn.net/cdn-cgi/image/fit=scale-down,width=10/https://us.v-cdn.net/6032394/uploads/9AF3HKSHA5NQ/image.png 10w, https://us.v-cdn.net/cdn-cgi/image/fit=scale-down,width=300/https://us.v-cdn.net/6032394/uploads/9AF3HKSHA5NQ/image.png 300w, https://us.v-cdn.net/cdn-cgi/image/fit=scale-down,width=800/https://us.v-cdn.net/6032394/uploads/9AF3HKSHA5NQ/image.png 800w, https://us.v-cdn.net/cdn-cgi/image/fit=scale-down,width=1200/https://us.v-cdn.net/6032394/uploads/9AF3HKSHA5NQ/image.png 1200w, https://us.v-cdn.net/cdn-cgi/image/fit=scale-down,width=1600/https://us.v-cdn.net/6032394/uploads/9AF3HKSHA5NQ/image.png 1600w, https://us.v-cdn.net/6032394/uploads/9AF3HKSHA5NQ/image.png"></img></a>
</div>
</div>
<ul><li>The ID must be prepended with a literal "g".</li><li>Please remove the "/" in order to get your group-id.</li></ul><p>Therefore, according to the example in the image above, your <strong>group-id</strong> is <strong>g123456789</strong>.</p><h3 data-id="-4"></h3>
</article>
</main>