VMware

« Keeping it simple with object-by-name. | Main | Managing VMware with PowerShell webinar. »

August 11, 2008

Improved Host Import

A few months ago I uploaded a little demo that let you import hosts into VirtualCenter using a spreadsheet. Well if there's one constant in software it's feature requests. A reader mentioned to me that this would be a lot more useful if he could import hosts directly into resource pools, clusters and things like that. Since it's pretty easy to do in PowerShell (less than 50 lines in total) I updated the spreadsheet in hopes that other people could get some use out of this.

Here's a preview of what it looks like:

Newshot1_2

One shortcoming of the spreadsheet is that if the host belonged to some other VirtualCenter, it will exist in that VirtualCenter as a disconnected host. It's fairly easy to get rid of these though, if you connect to the old VirtualCenter using the VI Toolkit, then run

Get-VMHost | where { $_.State -eq "Disconnected" } | Remove-VMHost -confirm:$false

they will all be removed. Enjoy!

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c328153ef00e553f9e56e8834

Listed below are links to weblogs that reference Improved Host Import:

Comments

Has anyone been able to use powershell to upgrade the VMware Tools across all Windows Guests? If so can you post a copy of the script?

Get-VM | Update-Tools will update it everywhere.

If you need more help, visit our forums at http://communities.vmware.com/community/developer/windows_toolkit

Post a comment

If you have a TypeKey or TypePad account, please Sign In