Bootstrap FreeKB - VMWare - Connect to VMWare ESXi using PowerShell
VMWare - Connect to VMWare ESXi using PowerShell

Updated:   |  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 Buy Me A Coffee



Comments


Add a Comment


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