<?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=AWS%2FSet_Host_Name</id>
	<title>AWS/Set Host Name - 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=AWS%2FSet_Host_Name"/>
	<link rel="alternate" type="text/html" href="http://wiki.ciscolinux.co.uk/index.php?title=AWS/Set_Host_Name&amp;action=history"/>
	<updated>2026-04-05T08:40:49Z</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=AWS/Set_Host_Name&amp;diff=3805&amp;oldid=prev</id>
		<title>Pio2pio: Created page with &quot;= Windows = == User-data == &lt;syntaxhighlightjs lang=&quot;powershell&quot;&gt; Add-Computer -ComputerName $env:COMPUTERNAME -NewName (((Get-EC2Instance -Instance (Invoke-RestMethod -Method...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.ciscolinux.co.uk/index.php?title=AWS/Set_Host_Name&amp;diff=3805&amp;oldid=prev"/>
		<updated>2019-02-06T18:37:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Windows = == User-data == &amp;lt;syntaxhighlightjs lang=&amp;quot;powershell&amp;quot;&amp;gt; Add-Computer -ComputerName $env:COMPUTERNAME -NewName (((Get-EC2Instance -Instance (Invoke-RestMethod -Method...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Windows =&lt;br /&gt;
== User-data ==&lt;br /&gt;
&amp;lt;syntaxhighlightjs lang=&amp;quot;powershell&amp;quot;&amp;gt;&lt;br /&gt;
Add-Computer -ComputerName $env:COMPUTERNAME -NewName (((Get-EC2Instance -Instance (Invoke-RestMethod -Method Get -Uri http://169.254.169.254/latest/meta-data/instance-id)).RunningInstance.Tags | Where-Object { $_.Key -eq &amp;quot;Name&amp;quot; }).Value) -DomainName example.com -Credential example\user -restart &lt;br /&gt;
&lt;br /&gt;
# Require IAM-profile&lt;br /&gt;
Invoke-RestMethod -Method Get -Uri http://169.254.169.254/latest/meta-data/instance-id&lt;br /&gt;
Get-EC2Instance -InstanceId i-12312312311111122&lt;br /&gt;
&lt;br /&gt;
$instance = (Get-EC2Instance -InstanceId i-12312312311111122)&lt;br /&gt;
$instance.Instances.tags&lt;br /&gt;
&amp;lt;/syntaxhighlightjs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Rename using PowerShell rename&lt;br /&gt;
&amp;lt;syntaxhighlightjs lang=&amp;quot;powershell&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;powershell&amp;gt;&lt;br /&gt;
Rename-Computer -NewName foo -Force&lt;br /&gt;
Restart-Computer&lt;br /&gt;
&amp;lt;/powershell&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlightjs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; Resources&lt;br /&gt;
* [https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2launch.html Configuring a Windows Instance Using EC2Launch] ec2launch&lt;/div&gt;</summary>
		<author><name>Pio2pio</name></author>
	</entry>
</feed>