<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>http://wiki.ciscolinux.co.uk/index.php?action=history&amp;feed=atom&amp;title=Octopus_Deploy</id>
	<title>Octopus Deploy - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.ciscolinux.co.uk/index.php?action=history&amp;feed=atom&amp;title=Octopus_Deploy"/>
	<link rel="alternate" type="text/html" href="http://wiki.ciscolinux.co.uk/index.php?title=Octopus_Deploy&amp;action=history"/>
	<updated>2026-04-05T23:50:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>http://wiki.ciscolinux.co.uk/index.php?title=Octopus_Deploy&amp;diff=4070&amp;oldid=prev</id>
		<title>Pio2pio at 12:09, 25 May 2019</title>
		<link rel="alternate" type="text/html" href="http://wiki.ciscolinux.co.uk/index.php?title=Octopus_Deploy&amp;diff=4070&amp;oldid=prev"/>
		<updated>2019-05-25T12:09:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:09, 25 May 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l102&quot;&gt;Line 102:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 102:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Certificate with thumbprint 26********76 imported successfully.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Certificate with thumbprint 26********76 imported successfully.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=Resources=&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*[https://octopus.com/docs/infrastructure/deployment-targets/windows-targets/automating-tentacle-installation automating-tentacle-installation]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pio2pio</name></author>
	</entry>
	<entry>
		<id>http://wiki.ciscolinux.co.uk/index.php?title=Octopus_Deploy&amp;diff=4069&amp;oldid=prev</id>
		<title>Pio2pio at 11:59, 25 May 2019</title>
		<link rel="alternate" type="text/html" href="http://wiki.ciscolinux.co.uk/index.php?title=Octopus_Deploy&amp;diff=4069&amp;oldid=prev"/>
		<updated>2019-05-25T11:59:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 13:59, 25 May 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Part of your script should contain hostname change, then reboot for the next step to use meaning full hostname to register with Octopus Deploy server&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Part of your script should contain hostname change, then reboot for the next step to use meaning full hostname to register with Octopus Deploy server&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Creates Schedule task to run on boot that disable itself&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Creates Schedule task to run on boot that disable itself&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l62&quot;&gt;Line 62:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 63:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Useful commands&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Useful commands&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;get-content -path C:\Octopus\Logs\OctopusTentacle.txt -Wait&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;.\Tentacle.exe show-configuration&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;.\Tentacle.exe show-configuration&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;.\Tentacle.exe service --instance $env:computername --stop --start --console #restart, use single action for just eg. stop&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;.\Tentacle.exe service --instance $env:computername --stop --start --console #restart, use single action for just eg. stop&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;#Logs&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;get-content -path C:\Octopus\Logs\OctopusTentacle.txt -Wait&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Pio2pio</name></author>
	</entry>
	<entry>
		<id>http://wiki.ciscolinux.co.uk/index.php?title=Octopus_Deploy&amp;diff=4068&amp;oldid=prev</id>
		<title>Pio2pio: Created page with &quot;= Tentacle = Automate Tentacle installation within AWS user data script. Note &lt;code&gt;tf_*&lt;/code&gt; variables are injected from Terraform template_file. * Part of your script shou...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.ciscolinux.co.uk/index.php?title=Octopus_Deploy&amp;diff=4068&amp;oldid=prev"/>
		<updated>2019-05-25T11:56:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Tentacle = Automate Tentacle installation within AWS user data script. Note &amp;lt;code&amp;gt;tf_*&amp;lt;/code&amp;gt; variables are injected from Terraform template_file. * Part of your script shou...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Tentacle =&lt;br /&gt;
Automate Tentacle installation within AWS user data script. Note &amp;lt;code&amp;gt;tf_*&amp;lt;/code&amp;gt; variables are injected from Terraform template_file.&lt;br /&gt;
* Part of your script should contain hostname change, then reboot for the next step to use meaning full hostname to register with Octopus Deploy server&lt;br /&gt;
* Creates Schedule task to run on boot that disable itself&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
$Logfile = &amp;quot;C:\ProgramData\Amazon\EC2-Windows\Launch\Log\UserData.log&amp;quot;&lt;br /&gt;
Function LogWrite {&lt;br /&gt;
   Param ([string]$logstring)&lt;br /&gt;
   $Stamp = (Get-Date).toString(&amp;quot;yyyy/MM/dd HH:mm:ss&amp;quot;)&lt;br /&gt;
   Add-content $Logfile -value &amp;quot;$Stamp $logstring&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
LogWrite &amp;quot;Start of user_data script **************&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$TentacleRegisterFileContent = @'&lt;br /&gt;
$TentaclePath=&amp;quot;C:\Program Files\Octopus Deploy\Tentacle&amp;quot;&lt;br /&gt;
if (-Not (Test-Path $TentaclePath -pathType container)) { Write-Output &amp;quot;Octopus path not found&amp;quot;; exit 1 }&lt;br /&gt;
cd $TentaclePath&lt;br /&gt;
.\Tentacle.exe create-instance         --instance $env:computername --config &amp;quot;C:\Octopus\Tentacle.config&amp;quot; --console&lt;br /&gt;
.\Tentacle.exe new-certificate         --instance $env:computername --if-blank --console&lt;br /&gt;
.\Tentacle.exe configure               --instance $env:computername --reset-trust --console&lt;br /&gt;
.\Tentacle.exe configure               --instance $env:computername --home &amp;quot;C:\Octopus&amp;quot; --app &amp;quot;C:\Octopus\Applications&amp;quot; --port &amp;quot;10933&amp;quot; --console&lt;br /&gt;
$localthumb=(.\Tentacle.exe show-thumbprint --instance $env:computername --nologo)&lt;br /&gt;
.\Tentacle.exe configure               --instance $env:computername --trust $localthumb --console&lt;br /&gt;
.\Tentacle.exe configure               --instance $env:computername --trust ${tf_octopus_fingerprint} --console&lt;br /&gt;
netsh advfirewall firewall add rule &amp;quot;name=Octopus Deploy Tentacle&amp;quot; dir=in action=allow protocol=TCP localport=10933&lt;br /&gt;
$localIP=(Invoke-RestMethod http://169.254.169.254/latest/meta-data/local-ipv4)&lt;br /&gt;
.\Tentacle.exe register-with           --instance $env:computername `&lt;br /&gt;
   --server &amp;quot;https://octopus.acme.com&amp;quot; --apiKey=&amp;quot;${tf_octopus_token}&amp;quot; `&lt;br /&gt;
   --role &amp;quot;api&amp;quot; --environment &amp;quot;${tf_octopus_environment}&amp;quot; `&lt;br /&gt;
   --comms-style TentaclePassive -h $localIP --force --console&lt;br /&gt;
.\Tentacle.exe service                 --instance $env:computername --install --stop --start --console&lt;br /&gt;
&lt;br /&gt;
#Disable scheduled task&lt;br /&gt;
#Unregister-ScheduledTask -TaskName &amp;quot;RegisterTentacle&amp;quot; -Confirm:$false&lt;br /&gt;
Disable-ScheduledTask -TaskName &amp;quot;RegisterTentacle&amp;quot;&lt;br /&gt;
'@&lt;br /&gt;
&lt;br /&gt;
$TentacleRegisterFilePath=&amp;quot;C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts&amp;quot;&lt;br /&gt;
Set-Content -Path &amp;quot;$TentacleRegisterFilePath\TentacleRegister.ps1&amp;quot; -Value $TentacleRegisterFileContent&lt;br /&gt;
&lt;br /&gt;
$tmpPath=&amp;quot;C:\tmp&amp;quot;&lt;br /&gt;
If (-Not (Test-Path $tmpPath -pathType container)) { md $tmpPath }&lt;br /&gt;
$tentacle_url  = &amp;quot;https://octopus.com/downloads/latest/WindowsX64/OctopusTentacle&amp;quot;&lt;br /&gt;
$tentacle_file = &amp;quot;tentacle_install.msi&amp;quot;&lt;br /&gt;
(New-Object System.Net.WebClient).DownloadFile(&amp;quot;$tentacle_url&amp;quot;,&amp;quot;$tmpPath\$tentacle_file&amp;quot;)&lt;br /&gt;
Start-Process msiexec.exe -ArgumentList &amp;quot;/i $tmpPath\$tentacle_file&amp;quot;, &amp;quot;/quiet&amp;quot; -Wait&lt;br /&gt;
&lt;br /&gt;
$schAction = New-ScheduledTaskAction `&lt;br /&gt;
  -Execute &amp;quot;Powershell.exe&amp;quot; `&lt;br /&gt;
  -WorkingDirectory C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts `&lt;br /&gt;
  -Argument '-NoProfile -WindowStyle Hidden -NoLogo -NonInteractive -c &amp;quot;powershell .\TentacleRegister.ps1 -verbose &amp;gt;&amp;gt; .\TentacleRegisterScheduleTask.log 2&amp;gt;&amp;amp;1&amp;quot;'&lt;br /&gt;
&lt;br /&gt;
$schTrigger   = New-ScheduledTaskTrigger   -AtStartup&lt;br /&gt;
$schPrincipal = New-ScheduledTaskPrincipal -UserId &amp;quot;NT AUTHORITY\SYSTEM&amp;quot; -LogonType ServiceAccount -RunLevel Highest&lt;br /&gt;
&lt;br /&gt;
LogWrite &amp;quot;Octopus Tentacle - register a task&amp;quot;&lt;br /&gt;
Register-ScheduledTask -Action $schAction -Trigger $schTrigger -TaskName &amp;quot;RegisterTentacle&amp;quot; -Description &amp;quot;Register OctopusDeploy&amp;quot; -Principal $schPrincipal&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Useful commands&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
.\Tentacle.exe show-configuration&lt;br /&gt;
.\Tentacle.exe service --instance $env:computername --stop --start --console #restart, use single action for just eg. stop&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Register. This will work calling ALB or calling the server behind ALB directly.&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
$localIP=(Invoke-RestMethod http://169.254.169.254/latest/meta-data/local-ipv4)&lt;br /&gt;
.\Tentacle.exe register-with --instance $env:computername `&lt;br /&gt;
   --server &amp;quot;https://octopus.acme.com&amp;quot; --apiKey &amp;quot;API-***********&amp;quot; `&lt;br /&gt;
   --role &amp;quot;app&amp;quot; --environment &amp;quot;APP-SERVERS-PROD&amp;quot; `&lt;br /&gt;
   --comms-style TentaclePassive -h $localIP --force --console&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
De-register&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
.\Tentacle.exe deregister-from --instance $env:computername `&lt;br /&gt;
   --server &amp;quot;https://octopus.acme.com&amp;quot; `&lt;br /&gt;
   --apiKey=&amp;quot;API-**********&amp;quot; --console&lt;br /&gt;
Detected automation environment: NoneOrUnknown&lt;br /&gt;
Deleting machine 'SERVER-1-PROD' from the Octopus Server...&lt;br /&gt;
The Octopus Server is still trusted. If you wish to remove trust for this Octopus Server, use 'Tentacle.exe configure --remove-trust=...'&lt;br /&gt;
Machine deregistered successfully&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Certificate work around when running without a profile eg. Schedule Tasks. It was not needed in my case.&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
Certificat ework around when running witout a profile eg. Schedule Tasks&lt;br /&gt;
.\tentacle.exe new-certificate -e tentacle.crt.base64&lt;br /&gt;
.\Tentacle.exe import-certificate --instance $env:computername  -f .\tentacle.crt.base64 --console&lt;br /&gt;
Importing the certificate stored in .\tentacle.crt.base64...&lt;br /&gt;
Certificate with thumbprint 26********76 imported successfully.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pio2pio</name></author>
	</entry>
</feed>