VMware Cloud Community
presence
Contributor
Contributor
Jump to solution

Reporting on VMs and their Disks

I am attempting to create a report on all of my VMs and the disks attached to each. My preference would to have the information in a .csv so I can work with it in Excel. What I have done so far has proved frustrating as I'm finding it difficult to combine those two.

What I have tried:

1. VI Toolkit - I know I can run the 'Get-VM' and 'Get-Harddisk' commands to get everything I need, but combining the two is beyond my current PowerShell skills.

2. alanrenouf's Report.ps1 - gives a lot of information, but nowhere close to what I need. I considered attempting to modify this script, but I figured it would take longer than learning how to do #1.

3. OpenXMPowerTools - getting this utility to come even close to working took hours to no avail, again more work than it's worth

I have some scripting skills (VBscript), it's just transferring them to the new-to-me PowerShell environment I am having difficulty with. I'm imagining extracting the VM names from the Get-VM command and then providing them to the Get-HardDisk command and writing VM Name plus filename output to the .csv.

Any assistance you can provide me in learning PowerShell would be greatly appreciated.

Thanks,

Joey

0 Kudos
1 Solution

Accepted Solutions
azn2kew
Champion
Champion
Jump to solution

Have you look at RVtools its pretty good and maybe give you export options or copied the data and import it with excel than. Its pretty nice ESX admin tool.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

Regards,

Stefan Nguyen

VMware vExpert 2009

iGeek Systems Inc.

VMware, Citrix, Microsoft Consultant

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA

View solution in original post

0 Kudos
4 Replies
azn2kew
Champion
Champion
Jump to solution

Have you look at RVtools its pretty good and maybe give you export options or copied the data and import it with excel than. Its pretty nice ESX admin tool.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

Regards,

Stefan Nguyen

VMware vExpert 2009

iGeek Systems Inc.

VMware, Citrix, Microsoft Consultant

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!! Regards, Stefan Nguyen VMware vExpert 2009 iGeek Systems Inc. VMware vExpert, VCP 3 & 4, VSP, VTSP, CCA, CCEA, CCNA, MCSA, EMCSE, EMCISA
0 Kudos
presence
Contributor
Contributor
Jump to solution

Stefen,

Thanks for showing me that utility. This is fantastic and definitely much easier than writing a script.

Thanks,

Joey

0 Kudos
fridge
Enthusiast
Enthusiast
Jump to solution

I just did had to do something similar for a storage migration project. I used Quest's PowerGUI () which is a GUI and script editor for PowerShell. I am just starting to play around with PowerShell, PowerGUI, VESI and the VI ToolKit. I also don't have a scripting background other than very simple batch files. However I found PowerGUI very easy to use and in less than 1 hour I had it installed and was able to create a report which I then imported into an Excel spreadsheet. With a little formatting, sorting and conversion of bytes to GB I had a report that looked like this:

Folder / Guest name

Path / VMDK name

Current Datastore

New Datastore

FileSize

File Size (GB)

C3_ECOM1

C3_ECOM1_1-flat.vmdk

DMX_BW1

dmz01

3221225472

3

C3_ECOM1

C3_ECOM1_2-flat.vmdk

DMX_BW1

dmz01

3221225472

3

C3_ECOM1

C3_ECOM1_3-flat.vmdk

DMX_BW1

dmz01

2147483648

2

C3_ECOM1

C3_ECOM1-flat.vmdk

DMX_BW1

dmz01

5368709120

5

C3_ECOM1 Total

13

I don't remember off the top of my head exactly what I did w/i PowerGUI, but it was pretty easy to figure out a way to get the info I needed.

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

Rod Gabriel

Wisconsin Area VMUG Leader

VMware vExpert - 2009

================================== Rod Gabriel Wisconsin VMUG Leader VMware vExpert - 2009-18 Twitter: @ThatFridgeGuy & @WIVMUG http://wivmug.org
fridge
Enthusiast
Enthusiast
Jump to solution

By the way, for anyone else new to PowerShell and the tools I mentioned above here is part of the agenda for the May 19th Wisconsin VMUG meeting:

(** Before you say, what good is that to me as I don't live anywhere near Wisconsin; arrangements have been made with Steve Murawski and Carter Shanklin to webcast these two presentations. Details can be found in my meeting post here.)

9:05 "Intro to Windows PowerShell and the VI Toolkit": Windows PowerShell is the new command line, scripting language, and automation framework from Microsoft. PowerShell support is growing amongst Microsoft server products and quickly becoming the common administrative denominator. Discoverability, readability, and extensibility all make PowerShell the management framework of choice. We'll take a quick tour of this new technology and see how VMware's VI Toolkit plugs right in and allows for unified management scripting. (Steve Murawski, Community Co-Director at PowerShellCommunity.Org)

9:50 Vizioncore presents "Optimize Day-To-Day Administration using Windows PowerShell and Virtualization EcoShell": Virtualization EcoShell (VESI) is a freeware desktop application for novice and expert IT administrators leveraging Windows PowerShell scripts across their multi-platform virtual environments.Find out how to optimize your day-to-day virtualization administration and effectively manage more systems in less time with this new freeware application from Vizioncore. (Scott Herold, Lead Architect - Virtualization at Quest Software)

You can catch this live (5/19 9am central) or there should be a recording of this available after 5/19.

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

Rod Gabriel

Wisconsin Area VMUG Leader

VMware vExpert - 2009

================================== Rod Gabriel Wisconsin VMUG Leader VMware vExpert - 2009-18 Twitter: @ThatFridgeGuy & @WIVMUG http://wivmug.org
0 Kudos