How to connect to VMWare ESXi using PowerShell

Home > Search > How-to
  by

Add the following to PowerShell ISE to connect to a VMWare ESXi hypervisor:

Add-PSSnapin VMware.VimAutomation.Core
Add-PSSnapin VMware.VumAutomation
Connect-VIServer -Server server_name -User username -Password password

 

You can add additional commands to this script to automate certain tasks. For example, you could automate the backup of the VMWare datastores.

Add-PSSnapin VMware.VimAutomation.Core
Add-PSSnapin VMware.VumAutomation
Connect-VIServer -Server server_name -User username -Password password

$datastore = Get-Datastore Datasore1
$datastore.ExtensionData.info.url  

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter in the box below so that we can be sure you are a human.




Comments