The PowerShell sessions at the VMworld were a big hit, VMware even had to upgrade the session rooms because of the high reservation numbers. Carter Chanklin, Product Manager at VMware's End User Enablement, recently started a new initiative, the VI toolkit extensions.
I'm really excited about the VI Toolkit Extensions as a way for us to make the common problems we see on our forums really easy to do. Just today, a user wanted to find all files on his datastores that contain the word "delta" (which can indicate a snapshot that hasn't been cleaned up properly). As it turns out, with the extensions this is just a one-liner. The art of PowerShell really seems to be the art of the one-liner and with the extensions there are already a lot of great one-liners you can use.
Here’s a short “how to” use the extensions:
Upgrade to Windows PowerShell 2.0 Community Technology Preview (CTP2).
Download Download the VI Toolkit (for Windows) 1.0.
Download the viToolkitExtension.psm1 module at Codeplex and place it somewhere on your local disk (I placed mine in c:\temp).
Start gPowerShell.exe (new in PowerShell 2.0) and paste the following code in the bottom window.
Add-Module "C:\Temp\viToolkitExtensions.psm1"
Get-PSSnapin -registered | Add-PSSnapin -passthru -ErrorAction SilentlyContinue
$Server = Connect-VIServer -Server 192.168.75.128 -User root -Password vmware
get-TkeOrphanedVmdk
When you take a look at the contents of the psm1 file there’s an interesting section : Half-baked stuff | New-OpenfilerIscsi.