There appear to be a couple of different ways to pass data to an Windows server instance at launch. It appears amazon has support for now passing commands to the instance at launch as outlined in this post: https://forums.aws.amazon.com/message.jspa?messageID=342135#342135
The .NET code I am using to start the instance is created from within an Amazon AWS console project in Visual Studio 2010
RunInstancesResponse InstanceResponse =
amazonEC2Client.RunInstances(new RunInstancesRequest()
.WithImageId("ami-9c9f3af5")
.WithInstanceType("t1.micro")
.WithKeyName("yahoo data instance")
.WithMinCount(1)
.WithMaxCount(1)
.WithUserData(Convert.ToBase64String(Encoding.UTF8.GetBytes
(<script>powershell
Set-ExecutionPolicy Restricted</script>"))));
It seems that nothing I put between the script tags will run. Would appreciate if anyone had any ideas about this or tried to use it. Thanks