So it has been a while since I wrote a blog post, unfortunately lock down has made it difficult to find time with work and family commitments. This does not mean I don’t have new content to post about… it just means I have no time to write posts!
So this post has a weird story behind it… a visitor to my blog posted a comment on an old thread asking if I could update my script to support token based auth… as I use this function in my scripts it was easy enough to adapt… but as I worked on it I realized I could improve a few other things. When I had finished all the changes, I left my computer on to play with my children thinking I would be back soon to push it to git and write a post about it…. unfortunately the world had other plans for me and my office was flooded!! luckily for me my computer was not damaged and the script was sitting there waiting to be uploaded.
The previous post on this topic was back in 2016, as I no longer post code on my blog make sure to check out v1.1 of the script here
Make sure to generate the credentials file which is used by the script to connect to vCenter with these commands.
$cred = Get-Credential $cred | Export-Clixml -Path "C:\vRops\config\vrops.xml"
Then to run the script use the example below and make sure to replace the ID’s
.\vRopsReportRunner.ps1 -vRopsAddress vRops.vman.ch -cred 'vrops' -vCenter 'bff52171-f5fb-4850-9ddb-92a46427773b' -Report '90f80540-c8af-497f-abbb-8174099e1af3' -format 'csv' -filename 'MySuperDupervRopsReport'
Wait for the report to spit out the file and bob’s your uncle! a report without logging into vROPS.
Hope this was helpful
Can we get a rest API to download the report and share it to some folder.
I have tried by using this:
This download the file into browser it self, but here i want to send it to a path.
I am not sure what you mean, it you are using a browser to download the report it would be a setting in the browser to specify a destination. Otherwise if it’s in powershell you can just specify the path yo download to.