Skip to content

HostPrep 4.4.1: PowerCLI loader (#12) - #13

Merged
pauldiee merged 1 commit into
mainfrom
powercli-loader
Nov 17, 2026
Merged

pauldiee merged 1 commit into
mainfrom
powercli-loader

Conversation

@pauldiee

Copy link
Copy Markdown
Owner

What

HostPrep.ps1 4.4.1 gets the same PowerCLI loader as FCHbaPathState v2.7, VCFHCLCompatibility v1.4.1 and VDSPortGroupManager v1.3.0:

  • imports VMware.VimAutomation.Core with -ErrorAction Stop;
  • stops when PowerCLI modules of different versions are already loaded;
  • on a failure, lists the loaded modules and links to the jump-host guide (VCF9-DeploymentPlanning docs/42);
  • gives an install hint per vCenter version (VCF.PowerCLI for vCenter 9).

Before this change, only the installation was checked, and a session with mixed versions carried on into the prompts.

Tested (offline, 2026-11-17)

  • pwsh 7.6.10, four scenarios: clean (13.5.1 loaded), old Core 13.3.0 preloaded (stops, lists modules), mixed versions (stops), no PowerCLI (install hint). All as expected.
  • Windows PowerShell 5.1: clean load of 13.5.1.
  • Not tested yet: a real run against a vCenter or host.

Closes #12 once tested.

🤖 Generated with Claude Code

Same loader as FCHbaPathState v2.7: import VMware.VimAutomation.Core with
-ErrorAction Stop, stop when PowerCLI modules of different versions are
already loaded, clear error with the loaded modules and a link to the
jump-host guide (VCF9-DeploymentPlanning docs/42), install hint per
vCenter version. Before, only installation was checked, and a mixed
session carried on into the prompts.

Tested offline 2026-11-17 in pwsh 7 (clean, old Core preloaded, mixed
versions, no PowerCLI) and Windows PowerShell 5.1 (clean).

Refs #12

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pauldiee
pauldiee merged commit 7966401 into main Nov 17, 2026
1 check passed
@pauldiee
pauldiee deleted the powercli-loader branch November 17, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HostPrep: PowerCLI loader (controlled import, mixed-version check, docs/42 link)

1 participant