I want to programmatically join a newly deployed Windows VM (VMware) to a domain. I have a simple PowerShell script that will do this, but there's a problem: I need the script to run the second time the VM reboots. Why? Well, the deployment process goes like this:
- Initiate deployment from template
- OS starts, gets to the login screen, then reboots, initiating sysprep to change the hostname (and a bunch of other things)
- OS starts again and automatically logs in to the "Administrator" account
- It's at this point, post-hostname change, that I want the script to run
Any way to do that?
- Initiate deployment from template
- OS starts, gets to the login screen, then reboots, initiating sysprep to change the hostname (and a bunch of other things)
- OS starts again and automatically logs in to the "Administrator" account
- It's at this point, post-hostname change, that I want the script to run
Any way to do that?