# encoding: ascii
# api: xml
# title: Amazon AWS user data
# description: This code can be added to an AWS instance to set the default password of an EC2 instance. It stops the need for using keys to set the windows password. It needs to be set in the “User Data” section when building the Instance.
# version: 0.1
# author: AdrianWoodrup
# license: CC0
# x-poshcode-id: 3939
# x-archived: 2017-04-30T10:37:40
# x-published: 2013-02-12T14:23:00
#
#
<powershell>

$ComputerName = $env:COMPUTERNAME
$user = [adsi]"WinNT://$ComputerName/Administrator,user"
$user.setpassword("Password")

</powershell>
