I want to create a list of DataCenters, Clusters, Resource Pools and their connected VirtualPortGroups and Datastores.
Does anybody have a script which fits ?
The New-VIProperty adds a new property of type CodeProperty to the PowerCLI object types you select.
The definitions done with the New-VIProperty cmdlet stay active during the complete session.
When you work interactively from the PowerCLI prompt, the PowerShell prompt or a GUI like PowerGui, you could consider placing these New-VIProperty cmdlets in one of the profile files.
If you start you scripts with, for example, the Windows Scheduler, you will have to include the New-VIProperty cmdlet in the script.
Now i try to etend the script to display the folders where DataCenters and clusters can reside. The problem is that the get-folder cmdlet lists all known folders of a server. I only need the organisational units down to the clusters.