VMware Cloud Community
knight77
Enthusiast
Enthusiast

prepare hosts in vcd via powerCLI

Hello, i am trying  to use a script to prepare esxi 5.5 / 6.0 hosts in vcd without storing the password in the script.  I found and have tested this http://blogs.vmware.com/PowerCLI/2012/04  from alanrenouf  but storing the password is a problem and i had issues getting it to pop up a prompt for the credentials.  is there a different way to do this and then disable the host afterwards in powerCLI?

I found this to disable a vcd host: Automating vCloud: "Disable Host" and "Redeploy All VMs" , again, not sure if there is other ways.

Thank you

Reply
0 Kudos
4 Replies
knight77
Enthusiast
Enthusiast

bump

any ideas?

Reply
0 Kudos
pcteck
Contributor
Contributor

Hi, I'm new and haven't tried it, but have you tried using 'Get-Credential' that would be used for Powershell?

Reply
0 Kudos
alanrenouf
VMware Employee
VMware Employee

‌yeah I agree,  you should be able to use get-credential and then convert it back into a string for use in the method

Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com
Reply
0 Kudos
knight77
Enthusiast
Enthusiast

thank you for the replies, I will see if I can make it work soon

Reply
0 Kudos