A useful property that is obviously missing from the Get-Folder cmdlet, is the path of the folder. In the PowerCLI Community there are regularly threads that ask for this kind of information. Most of the time it concerns scripts to export/import folder structures or scripts to migrate vCenters.
Another property that is obviously missing, is the indication if a specific folder is a so-called “blue” or “yellow” folder.
To solve this problem once and for all, I wrote this short function, called Get-FolderPath, that will return you both of these properties.
With vSphere 4.1 came 150+ new features. One of these is called Storage IO Control or SIOC.And it has been a very popular subject in the last weeks. Just a small selection of blog posts on the subject:
The only thing missing was a way to automate everything surrounding SIOC. And so I decided to write a couple of functions to fill that gap.
One of the demos we did in our VMworld 2010 US and Europe sessions, showed the use of the new Extensiondata property and of the new New-VIProperty cmdlet. Both features were introduced with PowerCLI 4.1. In my PowerCLI 4.1 brings the New-VIProperty cmdlet post I already showed the interesting possibilities this new cmdlet offers.
On my return from VMworld Europe there was a new thread in the PowerCLI Community that asked how one could get at the Runtime Name property as it is shown in the vSphere Client. The Get-ScsiLun and Get-ScsiLunPath cmdlets unfortunately do not return that property. So I guessed it was time to show once more the strength of the New-VIProperty cmdlet.
The VMTN Communities have always been a useful source of inspiration for writing scripts. This week, for example, there was an intriguing question raised in the Onyx Community. The user wanted to know if it was possible to monitor changes in the vSphere environment in real time.
As far as I know there is no API in the vSphere SDK to do real time monitoring. But the EventHistoryCollector can deliver something that I prefer to call nearly real time monitoring. The following script is a very basic function, written primarily to show that this principle of nearly real time monitoring works. The function displays some selected properties of each event it sees.
Last Sunday there appeared an interesting thread in the VMTN PowerCLI Community where one the questions was how to find all ‘Thin‘ virtual disks without passing via a virtual machine. The reason for this question was that most of the user’s virtual machines in Lab Manager are not registered on the vCenter Server.
My first idea was to use ‘Get-Datastore | Get-Harddisk‘ and then use the Extensiondata property to query the thinProvisioned property. Something like Arne did in his PowerCLI: Virtual Machine Disk (VMDK) info post. But that, unfortunately, doesn’t work since the Extensiondata property is $null in this case.