Skip to content

Tag: Powershell

How to connect to vCenter with PowerCLI

Connecting to vCenter with PowerShell and PowerCLI is very simple. Please make sure you have the vCenter PowerCLI PowerShell Module installed.

Import the PowerCLI module

Import-Module VMware.PowerCLI

Connect to vCenter Server

Connect-VIServer -Server YourVCenterServer -User YourUsername -Password YourPassword

Disconnect from vCenter

Connect-VIServer -Server YourVCenterServer -User YourUsername -Password YourPassword

It is best practise to disconnect from vCenter once you have finished with your connection.

Affiliate Disclosure

Please be advised that some of the links you encounter on our site are affiliate links. This means that if you click on them and make a purchase, we may earn a commission. Rest assured, we only link to sites and products we use and believe in. We strive for transparency and want you to know that our content may contain affiliate links.