How to use a Rocky Linux PowerShell Host with VCF Automation Orchestrator. Linux ❤️ PowerShell!
Streamline VMware Automation with VCF Automation, a Rocky Linux PowerShell host, custom workflows, and the simplicity of PowerCLI.
I like using PowerShell on Linux in my Lab:
In most cases, a PowerShell Host for VCF Automation Orchestrator is set up on a Windows Server, which works seamlessly. Having spent much of my career working with Microsoft Windows Server, I’m well-versed in its capabilities. However, in my lab, where resource efficiency is a priority, I prefer to run Linux VMs whenever possible. I keep these Linux VMs lean and mean for maximum performance.
I set out to explore how a Rocky Linux VM could function as a PowerShell Host. By default, VCF Automation Orchestrator includes a workflow called “Run SSH Command”, designed to execute SSH commands on a server. I began testing with this built-in workflow and customized it to better align with my requirements.
To keep the setup simple, I wanted to create a single workflow where I could specify the PS script path and name. The Linux VM details—such as hostname, username, password, and port—would remain static.
For 2025, I’ve been invited to be a VMware Community {code} Coach! This year, my blogs will feature even more code examples to help others get started with automation, VMware solutions, and much more…
Running PowerShell from the CLI and Executing a Script:
|
|
Workflow Design:

- Click to download the workflow
- Import the Package into Orchestrator
Java Script used in the Workflow to SSH to the Rocky Linux PowerShell Host and run a PS Script:
|
|
Code Examples:
- YAML file to store values to be used with scripts
|
|
Sample PowerShell Script:
- Sample script that I used to show that Rocky Linux can be used as a PowerShell Host
|
|
- VCF Automation Catalog with an Option to run the Orchestrator Workflow that was created to run the script on Rocky Linux
- Orchestrator Workflow as a Catalog Item
- This is a simple example to give you ideas. The script that will run could bascially Automate anything
- Script Parameters become fields on a custom form
- If you can write a script for the process, you can Automate it with Orchestrator
Install PowerShell on Rocky Linux:
|
|
Lessons Learned:
- If you like to use Linux for Servers, this is a good use case for running PowerShell scripts
- If you have existing PowerShell scripts that run on a Windows Server, most scripts should run on Linux with little to no modifications
- I enjoy bringing consistency to my scripts by leveraging a YAML file, similar to the approach used in automation platforms I work with
- All the scripts in this blog were created and tested on a Mac using PowerShell
- Don’t dismiss PowerShell just because it was created by Microsoft. Embrace it to enhance your automation journey!
In my blogs, I often emphasize that there are multiple methods to achieve the same objective. This article presents just one of the many ways you can tackle this task. I’ve shared what I believe to be an effective approach for this particular use case, but keep in mind that every organization and environment varies. There’s no definitive right or wrong way to accomplish the tasks discussed in this article.
Always test new setups and processes, like those discussed in this blog, in a lab environment before implementing them in a production environment.
If you found this blog helpful, consider buying me a coffee to kickstart my day.