I have another offtopic thing regarding reports
This days I watched the following presentations:
Breakout Session WSV406 | Advanced Automation Using Windows PowerShell 2.0 Dan Harman Jefrey Snover
The thing with the Export-ModuleMember was very interesting when building modules
Jonathan Medd PowerShell modules Presentation
In the last weeks I saw a lot of requests for reports. Would it be a nice idea to present something like a reporting module on PowerCLI Best Practices session at VMworld?
That's a good suggestion.
But how do you see that practically ?
A module with several reporting scripts as functions in there ?
Or 1 or more general reporting functions that can be parametrised in the call ?
the first choice could reach almost every one here in the forum. Just search the threads, copy all the functions and build the module and call the respective function on demand.
I think about the second choice:
1 or more general reporting functions that can be parametrised in the call ?
Parameterising the call should be the way to go. (At the moment I'm not sure if Alans vcheck function is a good reference for this. In his script you can uncomment necessary options.)
For this reason it might be necessary to analyze the last 15-20 report requests to understand the demands in a general way. This way a few functions would remain:
Let's say something like: one ore more for the host, one for cluster, one or more for vm and the combination between these functions.Depending on the request. This should be the starting point in rebuilding or "transforming" this functions in maby finally 3-4 functions with parameters.
The result should be exported using the export-xls function.
after I reread your great post this week after several month again I think that a lot can be done or prepared with the new-viproperty property.
You're right, you can create a set of New-VIProperty definitions, and depending on the report you want, you select a number of these properties.
It will be a lot easier to handle with properties instead of code blocks.