Thursday, January 14, 2010

VMware Infrastructure Power Documenter

The VMware Infrastructure Power Documenter is a really useful PowerShell script that queries VirtualCenter and produces reports of VM configurations, Data Center inventory, VM stats, etc. It will give you up to 9 different reports about VMware Infrastructure in less than 500 lines of code (including support for Filtering and Charting). I found it to be very usefull for asset tracking.


Scott Lowe has one of the best articles on VMware Infrastructure Power Documenter. Here is the link:
http://blog.scottlowe.org/2008/12/05/installing-the-vi-power-documenter/

Enabling AD Authentication with SUDO access on ESX Hosts

Here is a quick script I wrote to add AD login on ESX. I'm sure there is a better way to do it and look forward to your suggestions and comments.


# Enable AD Authentication and Add Domain controllers
esxcfg-auth --enablead --addomain=your domain addc=your domain


# Enable sudo and give wheel user group sudo access
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

# Add users
useradd -G wheel user1
useradd -G wheel user2
useradd -G wheel user3

# Add Users to Wheel group
useradd -G wheel user1
useradd -G wheel user2
useradd -G wheel user3

Cheers - Scott