powershell - How do I create a new user in Windows with a user-data script on AWS? -


i never use windows; bear me here. i'm trying make simple; want create new user, defined password, can use rdp instance on aws.

i've put following user-data script (and tried 40 other different ways well) no avail.

<powershell>  cmd.exe /c net user /add developer myp@ssword1 cmd.exe /c net localgroup administrators developer /add cmd.exe /c net localgroup "remote desktop users" developer /add  </powershell> 

my end-goal here want use provision ami packer, believe working - can never login aws' means of "get windows password" never resolves.

any solution me past step extremely helpful.

solution wrap in <script></script> instead while dropping cmd.exe; , looks if adding rdp group not necessary.

<script>  net user /add developer myp@ssword1 net localgroup administrators developer /add  </script> 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -