VMware Cloud Community
RobMokkink
Expert
Expert

script for adding all servers to vMA with adauth

I created a script to add all servers to the vMA with adauth.

I need to add some extra checks etc. But this is a first draft.

Please let me know what you think of it.

0 Kudos
3 Replies
lamw
Community Manager
Community Manager

Any reason you're adding individual ESX(i) host to vMA versus just adding the vCenter server? By adding vCenter target, you have access to all ESX(i) hosts under that given vCenter and you can still use AD authentication to vCenter and giving you access to each of the individual hosts. This is nice because if you had 200 hosts, you only need to add 1 vCenter system versus 200 separate hosts.

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

RobMokkink
Expert
Expert

Good point, but some commands need direct ESX of ESXi access:

vicfg-snmp

vifs

vicfg-user

vicfg-cfgbackup

vihostupdate

vmkfstools

esxcli

vicfg-ipse

0 Kudos
lamw
Community Manager
Community Manager

That's correct, though note that not all vCLI commands integrate with vMA's vifastpass, some examples are esxcli and resxtop.

In either case, I would just write a simple script to query all ESX(i) hosts from vCenter, output that to a file and assuming you have the same root password across all hosts you can just loop through that list and add targets into vMA with adauth.

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos