VMWare - Connect to VMWare ESXi using PowerShell

by
Jeremy Canfield |
Updated: March 16 2020
| VMWare articles
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
Did you find this article helpful?
If so, consider buying me a coffee over at