Re: embedding passwords in scripts? Is there a better way?
We decided that securing the folder the script lives in inside of HP-SA is sufficient for scripts that require stored credentials. We'll limit exposure by using credentials that only have the priviliges needed for the task at hand.
However, a follow up question specific to joining a windows machine to a domain. I have two powershell scripts to do this, the first one renames the system and reboots. The second script joins the system to the domain and reboots. The problem is that HPSA seems to execute the second script before the first one completes. The error I get from the second script is that it failed to run because the system is shutting down. Clearly undesirable.
But, how do I tell HP-SA that a script is going to reboot the server and the next script should delay execution?