I have a powershell script that runs Install-ADDSForest
to set up a lab environment. The script is actually run via VMware tools. During the Install-ADDSForest
process, the Windows server (2012) will restart, which is fine. And I can wait for VM tools to become available again before proceeding with the next parts of my scripting (install software etc), but the vmware guest operations agent becomes available while Windows is still in its limbo "Please Wait" state, before a login screen appears. However the next steps in the script rely on the domain actually existing.
How can I tell (from a powershell script) whether Windows is fully running? Specifically that the startup changes from Install-ADDSForest
have completed, or at least that the logon screen is showing?