If Connect-VIServer works in your terminal but a scheduled job hangs or says the cmdlet is missing, test the scheduled process before touching vCenter. For VCF PowerCLI 9.1.2 build 25952617, run the check with the same executable and account as the job. A successful interactive login proves neither of those match.

1. Prove what the job actually starts
PowerShell 7 runs side by side with Windows PowerShell 5.1; installing it does not rewrite a scheduled action that calls powershell.exe. Use the approved full path to pwsh.exe for a separate diagnostic action. Use -NoProfile -NonInteractive -File and the absolute path to the probe. Run it under the intended job identity and capture the output in a restricted log. Keep the original action untouched. See Microsoft’s migration guide.
Broadcom KB 463843 documents an apparent login hang on VCF PowerCLI 9.1.0 with Windows PowerShell 5.1. That symptom alone does not establish the cause on 9.1.2. For the 9.1.2 runner, use the release-specific requirement of PowerShell 7.4 or newer, on a supported build.
2. Prove the module resolves under that account
This local probe installs nothing and makes no connection. It prints paths so you can compare runners; keep them internal. The version is the published package version, not the version you should expect on every individual VMware submodule.
[pscustomobject]@{
Executable = (Get-Process -Id $PID).Path
Edition = $PSVersionTable.PSEdition
Version = $PSVersionTable.PSVersion.ToString()
Identity = [Security.Principal.WindowsIdentity]::GetCurrent().Name
} | Format-List
if ($PSVersionTable.PSEdition -ne 'Core' -or
$PSVersionTable.PSVersion -lt [version]'7.4') {
throw 'Run this job in a supported PowerShell 7.4+ process.'
}
$env:PSModulePath -split [IO.Path]::PathSeparator
Get-Module -ListAvailable -Name VCF.PowerCLI,VMware.PowerCLI,VMware.VimAutomation.Core |
Select-Object Name,Version,Path | Format-Table -AutoSize
Import-Module VCF.PowerCLI -RequiredVersion 9.1.2.25952617 -ErrorAction Stop
Get-Command Connect-VIServer -ErrorAction Stop |
Select-Object Name,Source,Version,@{n='ModulePath';e={$_.Module.Path}}
If the operator can import the module but the job cannot, compare the account and module paths before reinstalling anything. An offline archive can also leave an extra wrapper folder between the module root and the module folders; Broadcom KB 454298 describes that exact mistake. Use the root discovered in the intended process, not a path copied from a Windows PowerShell example. If the machine still runs legacy jobs, use a separate runner for the new module set instead of changing the shared machine-wide path in place. See the PowerCLI installation guide and Microsoft’s module path reference.
3. Run a read-only canary before switching the real job
After import passes, run the same non-interactive authentication method the production job will use. Use the approved vCenter FQDN and certificate trust. Run one bounded inventory read you know the automation identity is allowed to perform, such as reading a known datacenter. Treat an unexpected empty result as failure, not success. Give the canary a scheduler timeout. Check its output and exit status; a successful manual run does not pass this gate.
| Observation | Decision |
|---|---|
| PowerShell 5.1 or the wrong executable | Fix the scheduled action. Do not patch vCenter to fix the runner. |
| No matching module, or import fails | Verify the account’s module path, package layout and pinned module set. |
| Import succeeds, but the read fails | Check DNS, certificate trust, authentication and permissions separately. |
| Interactive read passes; scheduled read fails | Compare execution identity and environment. Keep the existing job in place. |
For example, if the operator’s terminal uses PowerShell 7 but the nightly task still launches 5.1, the first gate is already decisive. Prove the new action with a scheduled canary before changing the recurring job. Retain the known-good job definition and runner as the rollback point. This is a documented diagnostic workflow, not a claim that the 9.1.0 hang was reproduced on 9.1.2.
Planning the platform change as well? See the separate VCF 9.1.2 release comparison. A vCenter upgrade and a PowerCLI runner migration are two changes with different acceptance checks.
