Ask Your Question
0

input username and password as userdata on windows instance

asked 2017-04-05 20:26:05 -0500

tomcat8994 gravatar image

The way it is setup right now, a windows instance is automatically logged in. When spawning a windows instance I want to be able to input userdata and have to log in with the credential indicated in the userdata

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-04-06 06:06:40 -0500

Rajesh Ramachandran gravatar image

Start with :

 #ps1_sysnative (system native)

 #ps1_x86 (Windows On Windows 32bit)

Please check if the below would be helpful :

#PS1
$UserName = 'Administrator'
$Password = "abcd"
$ComputerName = "."
$Account = [ADSI]"WinNT://$ComputerName/$UserName,user"
$Account.SetPassword($Password)
$Account.SetInfo()
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2017-04-05 20:26:05 -0500

Seen: 277 times

Last updated: Apr 06 '17