I am working on a script through which I can create an instance and has the same setting (like vpc, subnet ID, Security group and user data) from another existing instance. I am able to get all the setting except user data as user data needs to be saved then can be passed to another instance. But when I saved the user data, it is saved in Jibrish language. I used this command : (Get-EC2InstanceAttribute -InstanceId i-sda23dsf -Attribute userData).UserData > userdata.txt so how can I pass it to another instance so that both can have same user data script.
↧