title: How to set the administrator password for a Windows Server machine on AWS from CloudFormation?
body: <p>I am deploying a CloudFormation template which launches an EC2 instance from the <em>Windows_Server-2019-English-Full-Base-2020.05.13</em> AMI.</p>
  
  <p>By default, the Windows Server image has an <code>Administrator</code> user. To connect to the instance via RDP, I have to navigate to the console, click on <em>Connect</em> and then get the generated random password from the console. </p>
  
  <p>Is there a way I can set the RDP password to a custom value? I would like to do this from the CloudFormation template, in the UserData section.</p>