Ultimate PowerShell automation for VMware Cloud Foundation 9 backups

After deploying VMware Cloud Foundation (VCF) 9, configuring backups for the management components is an important step to protect your environment.

Recently, I came across an excellent blog post by Gary Blake: VMware Cloud Foundation APIs: Configure SFTP Backup Location.

In his article, Gary explains how to configure SFTP backup locations using VMware Cloud Foundation REST APIs, CURL commands, and JSON payloads.

Since I regularly use PowerShell and VMware PowerCLI for infrastructure automation, I decided to create a PowerShell version of his approach.

Why PowerShell?

PowerShell makes it easier to integrate REST API calls into existing VMware automation workflows.

Using Invoke-RestMethod, we can communicate directly with the VCF APIs, process JSON responses, handle authentication, and automate configuration tasks.

The PowerShell version follows the same API-based approach for configuring SFTP backup locations for:

• VCF Management Services
• SDDC Manager and NSX Manager
• VMware vCenter Server

The goal is to simplify the configuration process, reduce manual steps, and make it easier to reuse across multiple VCF environments. Or i my case if i need rebuilding my lab its way faster!

Download the PowerShell Script

I’ve made my PowerShell version available on GitHub.

Download the PowerShell Script – GitHub

Before running the script, make sure to review the configuration parameters and required permissions.

Final Thoughts

VMware Cloud Foundation offers powerful REST APIs for automating infrastructure management.

By converting Gary’s CURL examples into PowerShell, I hope to make SFTP backup configuration easier. With a little help from AI.

Moreover, this approach helps administrators who prefer PowerShell with VCF Backup workflows.

A big thanks to Gary Blake for the original article and inspiration!

Run-VcfSftpBackupLocation.ps1

Run-VcfSftpBackupLocation.ps1

.

# Location
switch ((get-host).Name) {
    ‘Windows PowerShell ISE Host’ { $folder = $psISE.CurrentFile.FullPath -replace ($psISE.CurrentFile.DisplayName,””) }
    ‘ConsoleHost’ { $folder = $myInvocation.MyCommand.Path -replace ($myInvocation.MyCommand.Name,””)  }
    ‘Visual Studio Code Host'{ $folder = $psEditor.GetEditorContext().CurrentFile.Path | Split-Path  }
}

Set-Location $folder

.\Set-VcfSftpBackupLocation.ps1 -Component vCenter
.\Set-VcfSftpBackupLocation.ps1 -Component SddcManager
.\Set-VcfSftpBackupLocation.ps1 -Component SddcManagerBackupSchedule
.\Set-VcfSftpBackupLocation.ps1 -Component FleetLifecycle
.\Set-VcfSftpBackupLocation.ps1 -Component FleetBackupSchedule
.\Set-VcfSftpBackupLocation.ps1 -Component All

How to Export Auto-Generated Passwords to CSV in VCF 9.1

Introduction

Introduction

When deploying VMware Cloud Foundation (VCF) 9.1, the VCF Installer automatically generates passwords for various infrastructure components. These credentials are essential for managing and maintaining your VCF environment.

After successfully completing the deployment through the VCF Installer UI, you have the option to view and download these auto-generated passwords before finishing the deployment workflow and accessing VCF Operations.

But what happens if you forget to download the passwords?

Fortunately, the credentials can still be retrieved after deployment. To make this process easier, I created a script that exports the usernames and passwords from the SDDC Manager appliance(VCF-Installer) into a CSV file that can be imported into KeePass Password Safe.

What Happens to the VCF Installer After Deployment?

One interesting change in VCF 9.1 is how the VCF Installer operates after completing the deployment.

Instead of remaining a separate virtual appliance, the VCF Installer transitions into the SDDC Manager component. This eliminates the need for an additional virtual machine while preserving access to deployment information.

By default, opening the SDDC Manager FQDN in your browser redirects you to the SDDC Manager user interface.

However, the VCF Installer UI remains accessible through a specific URL.

For example:

https://sddcm01.vcf.lab/vcf-installer-ui/

Simply replace sddcm01.vcf.lab with the FQDN of your own SDDC Manager appliance.

This allows you to revisit the VCF Installer interface and access deployment-related information, including the auto-generated credentials, subject to the permissions and functionality available in your environment.

Exporting Auto-Generated Passwords

Although the VCF Installer provides an option to download the generated passwords, I wanted a more convenient way to organize these credentials.

Manually copying usernames and passwords into a password manager can be time-consuming, especially when managing multiple VCF deployments.

To simplify this process, I created a script that:

1.Retrieves the auto-generated usernames and passwords from the SDDC Manager appliance.
2.Organizes the credentials into a structured format.
3.Exports the information to a CSV file.
4.Prepares the CSV file for importing into a KeePass password database.

This makes it easier to store and manage your VCF infrastructure credentials in one central location.

Importing the Credentials into KeePass

Once the script has generated the CSV file, you can import the credentials into KeePass.

The goal is to avoid manually creating individual entries for every VCF component.

Depending on the CSV structure, the imported entries can include the component name, username, and password.

After importing the credentials, you can organize them into groups within your KeePass database.

Security consideration: The exported CSV file contains sensitive credentials in plain text. Store it only in a secure location, restrict access to authorized administrators, and securely remove temporary copies after verifying that the credentials have been imported successfully into KeePass.

Conclusion

Forgetting to download the auto-generated passwords after a VMware Cloud Foundation 9.1 deployment does not necessarily mean those credentials are lost.

Because the VCF Installer remains accessible through the SDDC Manager appliance, administrators can revisit deployment information and potentially retrieve the generated credentials.

With my export script, I wanted to make this process even easier by converting the credentials into a CSV file suitable for importing into KeePass.

This provides a convenient way to organize and securely manage the credentials required for your VCF infrastructure.

Download the Script

The script and additional instructions will be available on my GitHub repository.

https://github.com/WardVissers/VCF-Public/blob/main/Get-VcfOpsDeploymentSpec.ps1

Disclaimer: This script is intended for authorized administrators managing their own VMware Cloud Foundation environments. Always follow your organization’s credential-management and security policies.

 

.

VCF 9.1 Critical JV Certificate Caching Bug Can Cause Silent Outage

A field experience with VCF Operations and Fleet Lifecycle Management

The problem I encountered

Over the last few weeks, I encountered a strange issue in VMware Cloud Foundation 9.1. The Build > Software and Build > Lifecycle functionality was no longer working correctly.

Figure 1. Lifecycle functionality failing in the VCF interface.

My first thought was that something had gone wrong with the VCF Services Runtime control plane. I did not immediately know why it had failed, and unfortunately I did not have a VM-level backup of the VCF Services virtual machines available.

After investigating the symptoms, I suspected that I had run into a VCF 9.1 certificate-related bug.

Update: critical certificate caching issue

VCF 9.1 contains a critical issue in which the Java Virtual Machine (JVM) caches an internal security certificate during the initial bootstrap.

Issue details

Although the system correctly rotates the certificate in the background, the application does not dynamically reload the renewed certificate. Because these certificates have a strict 90-day validity period, environments deployed at General Availability (May 12, 2026) can begin experiencing silent outages around August 10, 2026.

Impact

The failure can occur without advance health-check warnings. Once the 90-day certificate threshold is reached, the environment may experience:

• Generic “503 Service Unavailable” errors
• Loss of access to affected UI functionality and blockage of component deployments
• Failure of day-two operations within Fleet Lifecycle Management (Fleet LCM)

What this looked like in my environment

In my case, the symptoms appeared in the VCF Build and Lifecycle areas and initially looked like a failure of the VCF Services Runtime control plane. The certificate-caching issue provides a plausible explanation for this behavior.

Action required

 

If you are running VCF 9.1, review the relevant Broadcom Knowledge Base articles and apply the documented workaround for the affected component. The source document identifies the following KB topics:

Takeaway

A certificate can be successfully rotated on the platform while an application continues using an older certificate cached by its JVM. That makes this issue particularly difficult to recognize: certificate rotation may appear healthy even though application communication eventually starts failing.

For VCF 9.1 environments approaching or exceeding 90 days since deployment, certificate-related TLS errors and unexplained 503 responses should therefore be investigated promptly.

What Changed in VCF LOG Deployment with 9.1.0.400

Platform changes since VCF 9.1.0.400

Since VCF 9.1.0.400, a lot has changed in the platform.

One of the more noticeable shifts is how log management works.

It now runs as a service inside the VCF Management Services Cluster. This is the same Kubernetes-based runtime that also hosts Fleet Management and the other core management components.

Additionally, in this blog I walk through how to deploy VCF Log Management in 9.1.0.400.

What Changed

Log Management changes in VCF

In VCF 9.0 and earlier, Log Management (formerly Aria Operations for Logs) was deployed as its own appliance VM. It also used a separate appliance cluster for management and access.

Additionally, from 9.1.0.400 onward, it is a built-in, containerized core service that runs natively on the VCF Management Services Platform. The deployment has changed the way configuration, access control, and alerting are managed.

Deployment, lifecycle management, configuration, access control, and alerting are now handled centrally through VCF Operations. This replaces the prior model of using a separate product UI.

Prerequisites

• DNS: A DNS-registered FQDN (with both forward and reverse lookup working)
• Capacity in the VCF Services Runtime: Deploying Log Management can trigger an automatic resize of the underlying Kubernetes cluster, so plan for the additional compute ahead of time.
• Sizing decision: The deployment size you choose determines how much compute and storage each node gets.
• Networking: Deployment currently supports VLAN-backed networks for the VCF Management Services; overlay networking is not yet supported for this component.

Resource Requirements for Log Management Deployments.

Size

vCPUs per Node

Memory per Node

Storage per Node

Number of Nodes

Small

8

16 GB

575 GB

1-19

Medium

24

48 GB

575 GB

3-19

Large

32

64 GB

575 GB

3-19

Procedure

1.Log in to the VCF Operations user interface at https://<vcf_operations_fqdn
2.Navigate to Build Lifecycle VCF Management.
3.On the Components tab, select Add Component Log management and configure the parameters for the deployment.


Now click Next to proceed to the Summary page for final review before deployment. Click Finish to start the deployment. As soon as the Deployment is done, you will see Log Management is running under VCF Operations -> Build -> Lifecycle.

Additionally, you can find the logs under VCF Operations -> Operate -> Log..

If you click on Log Sources, you will get an overview of the currently configured integrations, but this does not mean, that the Log collection itself is enabled.

Additionally, navigate to VCF Operations -> Operate -> Administration -> Configurations -> Log Collection to check Status within the system interface. Follow the on-screen prompts to reach the Status view and confirm whether logging is active or paused, so you can verify the current configuration.

However, under Status, the Log collection is not enabled.

If you click on the “i” under Status you will see:

This is strange in my opinion, but yes, you must switch back to the Integrations page in VCF Operations.

Additionally, proceed to edit your VMware Cloud Foundation Account from there, where the status changed, under Operate, Administration, Integrations.

From the Account page switch to Domains:

Next, on the Domain Page, start with vCenter to activate Logs Collection by clicking ‘Activate Log Collection’ and SAVE.

Same procedure i.e. NSX:

Additionally, after activation of Log collection you will see more Logs inside VCF Operations:


.

Next, go to VCF Operations Operate Administration Configuration Log Collection. Next, click Edit and scroll down.

Additionally, enable (Edit Log collection configuration).

.

Essential Lessons from a Minimal 2-Node VCF 9 Deployment

2 node vcf 9 deployment

After three great VMUG sessions in Amsterdam, online, and VMUGNL Summer Sessions, I received requests to share the slides.

The talks cover the session 2 node vcf 9 deployment, showing what you can learn from a minimum resources lab.

The response was great.

Additionally, in the slide deck, you will find the items.

The Start of My VCF Story marks the journey into practical creation and evaluation. It begins with a clear objective to explore a 2 node vcf 9 deployment in a real-world setting, testing how components interact under load and how failures are detected and recovered. This early phase framed every subsequent decision.

The first challenge was understanding core VCF concepts and practical limits, then translating them into a workable build plan. I weighed licensing, hardware, and timing constraints, while documenting assumptions so the team could reproduce results. Throughout, the focus remained on reliable deployment patterns rather than theoretical ideas.

The Road ahead combined hands-on testing, documentation, and stakeholder reviews to align goals and timelines. From these efforts, I learned practical lessons about resilience, observability, and change control, which shaped next steps for improving the process. I will continue refining configurations and sharing findings to guide future deployments.

VCF 9.1 What fixed the stuck deployment at “Deploy and Configure VCF Management Platform”

Overview

While deploying VMware Cloud Foundation (VCF) 9.1 in a homelab environment, the installation repeatedly failed during the ‘Deploy and Configure VCF Management Platform’ stage. Despite performing nine completely clean installations, the deployment consistently stopped at the same point.

Error Observed

The deployment task failed with the message: ‘Add VM Name Prefix to NSX Firewall Exclusion List’. The failure was identified in /var/log/vmware/vcf/domainmanager/domainmanager.log

Initial Research

Several Broadcom Knowledge Base articles appeared relevant, including KB440449 and KB 441122. Although the symptoms were similar, neither article fully resolved the issue.

VMSP Configuration Review

The original VMSP configuration used a name value matching the prefix of the fleetFqdn. The configuration was modified to use a unique VMSP cluster name. While this appeared promising, the issue persisted.

Additional Troubleshooting

Additional troubleshooting included changing VMSP IP ranges, rebuilding DNS records, validating forward and reverse DNS resolution, and reviewing deployment logs for networking issues.

Root Cause Analysis

The issue was ultimately not caused by the NSX firewall exclusion configuration. Multiple infrastructure issues contributed to deployment instability.

Resolution

1. Configure a single authoritative NTP source, preferably the domain controller.
See the planning and preparation workbook
https://techdocs.broadcom.com/us/en/vmware-cis/vcf/vcf-9-0-and-later/9-1/planning-and-preparation.html
2. Verify DNS records and name resolution.
3. Upgraded to a dedicated 10G Switch Ubiquiti UniFi Pro XG 8 PoE ipv 2.5GB Ubiquity Switch
Switch Pro XG 8 PoE - Ubiquiti Store Europe
4. Replace faulty network components.

Conclusion

Although the deployment failure appeared to indicate an NSX firewall exclusion issue, the underlying cause was network instability combined with infrastructure configuration problems. After correcting NTP configuration, validating DNS, upgrading network connectivity, and replacing the defective SFP+ module, the VCF 9.1 deployment completed successfully.

Setting Up KubeDoom on Kubernetes: A Beginner’s Guide

I followed William Lam’s article about MS-A2 VCF 9.0 Lab: Configuring vSphere Kubernetes Service (VKS)

I don’t have much experience with Kubernetes but wanted to try some new things.

The only container that I have running is Home Assistant on Docker.

Got to try to get Kubedoom working. So I did with the following steps.
Maybe in the near future I’ll try to add more games: Retro DOS Games on Kubernetes

Finally having a Kubernetes cluster version 1.32, which was required for running KubeDoom.

Afbeelding met tekst, schermopnameDoor AI gegenereerde inhoud is mogelijk onjuist.

Download kubectl

Afbeelding met tekst, schermopname, brief, ontwerpDoor AI gegenereerde inhoud is mogelijk onjuist.

mkdir d:\kubectl

Extract the downloaded ZIP file and place both executables (kubectl.exe and kubectl-vsphere.exe) in a folder such as: d:\kubectl

.\kubectl version –client

mkdir .kube

cd .kube

New-Item config -type file

.\kubectl vsphere login –server=https://31.31.0.7 –insecure-skip-tls-verify

Afbeelding met tekst, schermopname, LettertypeDoor AI gegenereerde inhoud is mogelijk onjuist.

kubectl –kubeconfig=kubernetes-cluster-jzvx-kubeconfig.yaml get pods

kubectl –kubeconfig=kubernetes-cluster-jzvx-kubeconfig.yaml apply -f kubedoom.yaml

Afbeelding met tekst, schermopname, LettertypeDoor AI gegenereerde inhoud is mogelijk onjuist.

kubectl –kubeconfig=kubernetes-cluster-jzvx-kubeconfig.yaml -n kubedoom get svc

Afbeelding met tekst, schermopname, LettertypeDoor AI gegenereerde inhoud is mogelijk onjuist.

The password to Kubedoom is idbehold

Download VNC Viewer: https://www.realvnc.com/en/connect/download/viewer

Afbeelding met tekst, schermopname, pc-game, MultimediasoftwareDoor AI gegenereerde inhoud is mogelijk onjuist.

This is funny and cool!

Deploying Windows VMs with Terraform and Packer

A whale ago, I started using Packer for creating Windows Templates for using in my home lab.
I blogged about it here: Windows Server 2025 “Preview” deployment with Packer

So now I want to deploy a template with Terraform, which was created earlier by Packer.

First, we need to ensure we have the Terraform downloaded and the vSphere provider Initialized.

  1. Install Terraform: You can download it from the official Terraform website and follow the installation instructions for your operating system.

I made my life a little easier to create a PowerShell script that downloads the latest version: Download Terraform.ps1

  1. Initialize Your Terraform Configuration: Create a directory for your Terraform configuration files. Inside this directory, create a `main.tf` file (or any `.tf` file) where you will define your provider and other configurations.
    Define the vSphere Provider in Your main.tf: Add the following block to your Terraform configuration file to specify the use of the vSphere provider:

terraform {

  required_providers {

    vsphere = {

      source = “HashiCorp/vsphere”

      version = “> 2.11”

    }

  }

}

provider “vsphere” {

  user           = vcenter_username

  password       = vcenter_password

  vsphere_server = vcenter_server

  # If you have a self-signed cert

  allow_unverified_ssl = true

}

Replace ”vcenter_username”, ” vcenter_password” , ”vcenter_server” with your actual vSphere credentials and server address.

  1. Basic Terraform Commands

Terraform.ps1

# Go to the Terraform download folder

$terraformfolder = ‘d:\automation\terraform\’

Set-Location $terraformfolder

# Download Terraform plugins

.\terraform.exe init

# Test Run

.\terraform.exe plan

# Run Terraform

.\terraform.exe apply

# Clean Up what you created

.\terraform.exe Destroy

Initialize the Terraform Working Directory: Run the following command in your terminal from the directory where your Terraform configuration file is located:

terraform init

Afbeelding met tekst, schermopname, Lettertype, softwareDoor AI gegenereerde inhoud is mogelijk onjuist.

This command will download the vSphere provider and initialize your Terraform working directory. It sets up and downloads the necessary provider plugins for Terraform to interact with vSphere.

Verify the Installation: After running `terraform init`, you should see output indicating that the vSphere provider has been successfully installed. You can now proceed to create Terraform configurations to manage your vSphere resources.

Deploy a Template VM within vSphere

In this example, we are deploying a VM running Windows Server 2022.

Terraform Module Structure

  1. variables.tf: Define the variables for the module.
  2. main.tf: Contains the main configuration for the VM.
  3. outputs.tf: Define the outputs for the module.

Variables.tf

variable “vsphere_user” {

  default     = “<your_vcenter_username_here>”

   description = “vSphere username to use to connect to the environment – Default: administrator@vsphere.local”

}

variable “vsphere_password” {

  default     = “<your_vcenter_password_here>”

  description = “vSphere vCenter password”

}

variable “vsphere_server” {

  default = “<your_vcenter_here>”

  description = “vSphere vCenter server”

}

variable “datacenter” {

  default = “<your_datacenter_here>”

  description = “vSphere datacenter”

}

variable “cluster” {

  default = “<your_cluster_here>”

  description = “vSphere cluster”

}

variable “network” {

  default = “<vcenter_network>”

  description = “vSphere network”

}

variable “datastore” {

  default = “<your_destination_datastore_>”

  description = “vSphere datastore”

}

variable “template” {

  default = “<your_template_name_here>”

  description = “Template VM”

}

variable “customization_specifications” {

  default = “<vcenter_customization_specifications>”

  description = “Customization Spec”

}

When you run “.\terraform plan” you do a test run to check your coding

Afbeelding met tekst, schermopname, LettertypeDoor AI gegenereerde inhoud is mogelijk onjuist.

Afbeelding met tekst, schermopname, Multimediasoftware, softwareDoor AI gegenereerde inhoud is mogelijk onjuist.

When you run “.\terraform apply” build your virtual machine

Afbeelding met tekst, schermopname, LettertypeDoor AI gegenereerde inhoud is mogelijk onjuist.

Afbeelding met tekst, schermopname, Lettertype, softwareDoor AI gegenereerde inhoud is mogelijk onjuist.

Based on: https://vminfrastructure.com/2025/03/11/deploying-a-vm-using-terraform/

It works but it need some tweaking and fixing.

Adding a TPM2.0 security device does not work right now
Server 2025 customization does not work

Windows Server 2025 “Preview” deployment with Packer

As Windows Server 2025 Preview is officially released, I wanted to test a  automated build of the Windows Server 2025 Preview release. So that I can deploy this in my home lab and going to test the new features if I can find the time….

About Hashicorp Packer

Hashicorp Packer is a self-contained executable producing quick and easy operating system builds across multiple platforms. Using Packer and a couple of HCL2 files, you can quickly create fully automated template(s) with latest Windows Updates en VMware Tools. When you schedule a fresh builds after patch Tuesday  you have always an up-to-date and fully secured template.

When using VMware customization tools. You can spin up vm’s in minutes.

Automated Windows Server 2025 “Preview” Build

Files you need?
The files and versions I am using at the time of this writing are as follows:

Outside of downloading both Packer and Windows Server 2022 Preview build, you will need the following files:

  • windowsserver2025.auto.pkrvars.hcl – houses the variable values you want to define.
  • windows2025.json.pkr.hcl – the Packer build file
  • Answer file â€“ Generated with Windows System Image Manager (SIM) you can download the file below
  • Custom script file(s) – optional

Other considerations and tasks you will need to complete:

  • Copy the Windows Server 2025 ISO file to a vSphere datastore

Windows Server 2025 unattend Answer file for the automated Packer Build

Like other automated approaches to installing Windows Server, the automated Windows Server 2025 Packer build requires an answer file to provide answers to the GUI automatically and other installation prompts that you normally see in a manual installation of Windows Server.

You will find the scripts here: https://github.com/WardVissers/Packer-Win2025

The only problem that I had was: Switching from Nic from Public to Private

# Set network connections profile to Private mode.

Write-Output ‘Setting the network connection profiles to Private…’

do {

    $connectionProfile = Get-NetConnectionProfile

    Start-Sleep -Seconds 10

} while ($connectionProfile.Name -eq ‘Identifying…’)

Set-NetConnectionProfile -Name $connectionProfile.Name -NetworkCategory Private

Windows Server 2025 Preview (Build: Canary 26052)

I had some time to check out the new version of Server 2025.

For the full upcomming features check: https://ignite.microsoft.com/en-US/sessions/f3901190-1154-45e3-9726-d2498c26c2c9?source=sessions

Download Server 2025 Preview: https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewserver

Server 2025 will come with a lot of features (My Top 20+):

  • General – Server 2022 upgrade to .vNext (Controled bij GPO)
  • Hot Patching (Arc Enabled, Monthly Subscription)
  • Active Directory – 32k page
  • Active Directory – Numa
  • Active Directory – LDAP TLS 1.3
  • Active Directory – Improved Security for Confidential Attributes
  • Active Directory – Active Directory LDAP prefers Encryption bij Default
  • Active Directory – Kerberos Support for AES/SHA256/384
  • Active Directory – Changes to Default behavior of legacy SAM RPC Spassword change methods
  • Active Directory – Kerberos en KPINT Support cryptographic agility
  • Active Directory – New AD Forest en Domein Level (Minimal Server 2016 requirement)
  • Storage – NVME 70%/90% peformance increase
  • File Server – SMB over Internet (Quick Protocol)
  • File Server – More Control over SLTM
  • File Server – SMB Limitor (Enabeld bij Default)
  • File Server – Signing by Default
  • File Server – Minimum version SMB
  • File Server – More Secure Bij Default (Netbios disabled bij default)
  • RDS – M365 Apps stil supported for every Windows Server release 2-3 years
  • Finance – General support and Pay-as-you-go Support

Need to find some time to dig in

Handy link: https://techcommunity.microsoft.com/t5/windows-server-insiders/announcing-windows-server-preview-build-26040/m-p/4040858

Translate »