Connect-VIServer Hangs in VCF PowerCLI 9.1 on PowerShell 5.1
search cancel

Connect-VIServer Hangs in VCF PowerCLI 9.1 on PowerShell 5.1

book

Article ID: 463843

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When running automated scripts or commands against VMware vCenter Server using VMware Cloud Foundation (VCF) PowerCLI, the Connect-VIServer cmdlet hangs indefinitely and does not return a response.

On the client machine, debug output stops at Logging in to server. and fails to progress.

Environment

VMware vCenter Server 9.X

VMware Cloud Foundation (VCF) PowerCLI 9.1.0

Windows PowerShell 5.1

 

Cause

Windows PowerShell 5.1 is deprecated in VCF PowerCLI 9.0 and is not supported with VCF PowerCLI 9.1.x, causing client-side compatibility issues.

Resolution

 

  1. Upgrade PowerShell on the client machine to a supported version (PowerShell 7.0.13 or later). For detailed instructions on upgrading PowerShell on Windows, consult Microsoft documentation or Microsoft Support.
  2. Open the upgraded PowerShell session and verify the version.
  3. Re-run Connect-VIServer or your automated scripts to confirm that the connection completes without hanging.

 

Additional Information

Compatibility Matrix for VCF PowerCLI