Powering your VMware Cloud Foundation “lab” environment on and off shouldn’t be a manual process.
A complete shutdown of a VMware Cloud Foundation (VCF) environment is uncommon, but for some energy savings and some time you does not use your lab often, you want a repeatable, reliable, and automated procedure, manually powering dozens of virtual machines in the correct order is both time-consuming and error-prone.
To solve this problem, I created two lightweight PowerCLI scripts:
vCenter and ESX hosts are manual (For vSAN cluster I did not find the correct code yet!)
Let me know if you have any questions or addons
Both scripts are available on GitHub and are designed to automate the startup and shutdown of a VMware Cloud Foundation management domain.
GitHub Repository
Note: Both Scripts do not work with VCF 9.1!!!!
Why These Scripts?
Although VMware Cloud Foundation automates the deployment and lifecycle of the platform, a full platform shutdown still requires the administrator to respect service dependencies.
For example:
Powering everything on simultaneously often results in services that need additional time—or even manual intervention—to recover.
These scripts automate the entire sequence descripted als following:
Start the Management Domain (VCF 9.0)’
Shut Down the Management Domain (VCF 9.0)
Typical Use Cases
These scripts are useful in many environments, including:
I personally use them in my VCF lab, where powering the environment up or down manually became repetitive and unnecessarily time-consuming. Automating the sequence not only saves time but also ensures a consistent and predictable startup every time.
Customizing the Scripts
Every VMware Cloud Foundation deployment is different.
The scripts are intentionally straightforward so you can easily adapt them by:
Because everything is written in PowerCLI, modifications are simple and require only basic scripting knowledge.
Future Improvements
Some ideas I’m considering for future releases include:
Contributions and suggestions from the community are always welcome.
Lessons Learned
During development I discovered:
Download
You can download the latest version from my public GitHub repository:
You can also find more VMware Cloud Foundation automation projects, PowerCLI scripts, and lab guides on my website:
Conclusion
A VMware Cloud Foundation environment consists of many interconnected services, and those services should be started and stopped in the correct order.
These lightweight PowerCLI scripts automate that process, making startup and shutdown predictable, repeatable, and significantly less error-prone. Whether you’re running a production management domain or a small VCF lab, automating these operational tasks saves time and reduces the risk of mistakes.
If you have ideas for improvements or additional features, feel free to open an issue or submit a pull request on GitHub. Happy automating!