VMware Cloud Community
buzzlightyear_2
Contributor
Contributor
Jump to solution

PowerCli to obtain audit information

Hi people can anyone help with this, I need to obtain the below information from are virtual environment (each esxi and esx host) and wondering if anyone has a script to complete it?

Product name Vpshere

Version 4.1 etc

Edition Enterprise etc

Machine name ESX1 etc

Number of cores

Number of physical process

I can get the Name Cores and physical by the get-vmhost | select version, name, Numcpu etc but I'm unsure there is a better way of getting it?

Also Vcentre info - license information if anyone can help with that.

Thanks to all that reply.

0 Kudos
1 Solution

Accepted Solutions
Grzesiekk
Expert
Expert
Jump to solution

Hi there,

regarding the licensing stuff feel free to take a look my solution

http://psvmware.wordpress.com/2012/08/13/get-licensereport-to-obtain-informations-regarding-licenses...

And for those properties that you are looking here, you were doing it ok

get-vmhost |select version,name,@{n='total cpus';e={$_.numcpu} },@{n='number of sockets';e={$_.extensiondata.hardware.cpuinfo.numcpupackages}}

for all hosts it will select its version,host name, number of cpu, number of sockets

The rest you will gain from above link

Regards,

Greg

--- @blog https://grzegorzkulikowski.info

View solution in original post

0 Kudos
3 Replies
Grzesiekk
Expert
Expert
Jump to solution

Hi there,

regarding the licensing stuff feel free to take a look my solution

http://psvmware.wordpress.com/2012/08/13/get-licensereport-to-obtain-informations-regarding-licenses...

And for those properties that you are looking here, you were doing it ok

get-vmhost |select version,name,@{n='total cpus';e={$_.numcpu} },@{n='number of sockets';e={$_.extensiondata.hardware.cpuinfo.numcpupackages}}

for all hosts it will select its version,host name, number of cpu, number of sockets

The rest you will gain from above link

Regards,

Greg

--- @blog https://grzegorzkulikowski.info
0 Kudos
buzzlightyear_2
Contributor
Contributor
Jump to solution

Thank you worked a treat.

0 Kudos
ITMonsterrrrrr
Contributor
Contributor
Jump to solution

Understanding I am little late, I did write an awesome function for you! Smiley Happy I put it up on my blog, heres the link. http://itmonsterrrrrr.blogspot.com/2012/10/powercli-esxi-host-audit.html. It grabs everything you are asking for in a very simple way. You can put the function into your Powershell profile and use it whenever you want. Heres an example how to run it:

Get-VMHostAudit -vCenter 192.168.0.1 -Username ITMonsterrrrrr -Password Cr@CkTh!s -Format Table

Pretty simple, just pass it your vCenter creds and tell the function if you want the output in table or list format. Hope this helps!