VMware Cloud Community
IgorAbzalov
Enthusiast
Enthusiast

Howto generate and download all reports in vROPS via PowerShell

Hi.

I have one simple task with vROPS 6.3. In a given day, I have to generate and download all the standard reports on all objects of my vCenter 5.5.

How can i do it with VMware vSphere PowerCLI and/or PowerShell?


I read vRops API consumed with Powershell - Michael Ryom, vDeepDive: vROps REST API Deep Dive : Part 1 Create Report and some other sources.

6 Replies
sxnxr
Commander
Commander

I know this does not answer your question but can you schedule the reports and email them to yourself?

IgorAbzalov
Enthusiast
Enthusiast

For simple reports it can be solution. But some reports have dynsamic set of parameters, for example reports for given VM. I don't want manually schedule 100+ reports. Using vROPS REST API more interesting and can save my time.

Reply
0 Kudos
carvaled
Enthusiast
Enthusiast

you can do this via the suite-api.... i documented how to do this and have a little script example on my blog

http://vman.ch/vrops-suite-api-run-report/

IgorAbzalov
Enthusiast
Enthusiast

Thank you for link. Some jems i see here. Let's go further. How to get all report definitions and then cycle through them for report generation?

I can get all Report Templates with

$repdefs=Invoke-RestMethod -Method Get -uri "https://vrops-hvm.corp.local/suite-api/api/reportdefinitions" -Credential $cred

But for each given Report i must give new $Body in Invoke-RestMethod because of different object, for which report will be generated.

And also i don't want clear out all generated reports, but download only last generated report. How can i do it?

Reply
0 Kudos
carvaled
Enthusiast
Enthusiast

hey,

sorry i have been a bit busy this week with work, I will try and help you over the weekend Smiley Happy

carvaled
Enthusiast
Enthusiast

So I wrote a little script to get all the info you need to run the reports using the original script I provided... you will need to use it in a loop.

This script gives you a csv list of the report details you will need.

http://vman.ch/vrops-suite-api-reportdefinitions/