Running vSphere CLI for the Targets
If you have added multiple target servers, you should specify the target server explicitly when running commands. By default, vMA executes commands on the server that is configured as the default target by using the vifptarget -s command. If none of the added target servers are configured as the default target and no target server is explicitly specified when running the vSphere CLI commands, then the commands are run against the vMA itself.
To run vSphere CLI for the targets
1
vifp addserver <server1>
vifp addserver <server2>
2
vifp listservers
3
Run vifptarget.
vifptarget -s <server2>
The command initializes the specified target server. Now, this server will be taken as the default target for the vSphere CLI or vSphere SDK for Perl scripts.
4
esxcli --server server2 network nic list