<https://lh3.googleusercontent.com/-9bHx5RpKVCg/Wu_XfChm-BI/AAAAAAAATDc/1detxkerD2ImMuCCsNhVr4sBye-UsTdCgCLcBGAs/s1600/PS.PNG>
Hi Gabo, 

I have double checked my PS script and even tested that again on a 
unjoin-domained VM, it worked fine as shown in the photo I have attached.
I reckon the reason why the password value you mentioned did not match as 
PS converted the plain text string to secure.string in which it will keep 
you string secured and hidden so when you do write-host I will not display 
the whole readable string to the console. 
And just wondering how could Packer use the credential which I specified in 
the domain join script to log into the VM after it finished doing the 
domain join as that domain join script was called separately. 

<https://lh3.googleusercontent.com/-9bHx5RpKVCg/Wu_XfChm-BI/AAAAAAAATDc/1detxkerD2ImMuCCsNhVr4sBye-UsTdCgCLcBGAs/s1600/PS.PNG>

Regarding your last suggestion about replacing the window-restart part with 
another script, I have tried that several times and still the same issue, 
Packer could not run anything after executing the domain join script. The 
Packer build will be fine and successfully build an image if I remove the 
PS domain join script from the template and just run normal PS scripts. 
Thus, I reckon there is something to do with the PS domain join script 
which I hardly find any errors and it just works totally fine when I run it 
in my local VMs. 

Thanks 

<https://lh3.googleusercontent.com/-uKi7kXZLbZc/Wu_VY63GB7I/AAAAAAAATDQ/PSThwejh3e4LPKCTnB1RgTAM1xAoM2n1wCLcBGAs/s1600/PS.PNG>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/839d34f8-637a-4710-a321-713daf64130f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to