Need a command or Powershell script in vSphere

Need a command or powershell script in vSphere to find the amount of cluster resources(CPU and Memory) are used and how much amount of resources(CPU and Memory) are free
jmohan0302Asked:
Who is Participating?
 
Andrew Hancock (VMware vExpert / EE MVE^2)Connect With a Mentor VMware and Virtualization ConsultantCommented:
I would recommend using the following, also VMware recommends the use of PowerCLI, which is PowerShell interface with vSphere-specific additions.

http://communities.vmware.com/community/vmtn/server/vsphere/automationtools/powercli

One of the simplest PowerCLI examples, and something which is actually extremely useful on its own, is the Get-VM cmdlet. Which lists VMs.

PowerCLI can be a bit overwhelming to use,  But it can be enhanced with a nice toolset and a library of preconfigured scripts to jump-start your mass changes, which is possible with PowerGUI

http://powergui.org/index.jspa

and there's a video here showing you how to use and install.
http://www.virtu-al.net/featured-scripts/vmware-powerpack/
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
0
 
Luciano PatrãoICT Senior Infraestructure  Engineer  Commented:
Hi

You can use some PowerCli scripts.

Download the VMware PowerCli

Also download the PowerGui and VMware powerpack.

Check Videos(on PowerGui site) and Help and will learn how to use this and run many statistics from vCenter or VMs.

http://downloads.vmware.com/downloads/download.do?downloadGroup=PCLI50

http://powergui.org/entry.jspa?externalID=1802

Hope this can help

Jail
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
jmohan0302Author Commented:
Hi Hanccocka,

As you suggested I have installed the PowerpackGUI into my local machine. Also I have latest vCLi installed on my local machine. How can I use the Powerpack GUI installed on my local machine to retrieve information about my Virtual center server.
0
 
Luciano PatrãoICT Senior Infraestructure  Engineer  Commented:
Hi

You now can connect to your vCenter(or host) and run most of the scripts that is in the pack of PowerGui

http://powergui.org/entry.jspa?externalID=1802

You can find here the information how to work with this.

Jail
0
 
jmohan0302Author Commented:
Good
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.