Every once in a while I check-up on Hal Rottenbergās weblog TechProsaic. Just curious if his upcoming PowerShell book is available yet. Halās last post mentions a Community tread which contains a script to install the VMware tools on a bunch of virtual machines without rebooting them. Here is the PowerShell script.
$cluster = "< >" # Enter the required cluster name
$installerArgs = 'REBOOT="ReallySuppress"'
Get-Cluster -Name $cluster | Get-VM | % { (Get-View $_).UpgradeTools_Task($installerArgs) }
Wednesday, November 19. 2008
How to install VMware tools without a reboot
Tuesday, November 18. 2008
Speaker Idol Finalist - Dimitry Sotnikov
Sunday, November 9. 2008
Creating a PowerShell GUI with PrimalForms
In this article Iāll give you a short demo how easy it is to create a PowerShell user interface with the free PrimalForms from Sapien.Ā At the 4th of November Sapien released their first public version of PrimalForms. Jeffery Hicks over at Sapien reportsĀ :
I hope you are as excited about the release of PrimalForms as I am. In the past creating a Windows form in PowerShell was a very tedious task and one I rarely used except for the most simplest of forms. No more. The free PrimalForms tool lets me create a very rich Windows form using a WYSIWYG editor. I can export the form to a file, add my PowerShell code and call it a day.
First download PrimalForms at Sapienās the free tools section. After installing, you just create a wonderful user interface and copy the PowerShell scriptĀ code to your clipboard.
In this example I created a button and a multiline text field. I copied my code to the PowerGui script editor and added a few lines of my own code.Ā The following two lines are added to the top of the script.
Get-PSSnapin -registered | Add-PSSnapin -passthru -ErrorAction SilentlyContinue
$Server = Connect-VIServer -Server 192.168.75.128 -User root -Password vmware
When you walk through the script youāll see the sections where you can add your own code. In this example I added the following code under the button.
#Provide Custom Code for events specified in PrimalForms.
$button1_OnClick=
{
#TODO: Place custom script here
$textBox1.text = Get-VM
}
And hereās the result.
Saturday, November 8. 2008
Enabling the VI Toolkit Extensions
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.
Sunday, October 26. 2008
Windows PowerShell Quick Reference

Tuesday, October 21. 2008
Setting VM video hardware acceleration level to the max
Hugo Peeters over at PeetersOnline has created a simple, fire-and-forget PowerShell script that sets the Hardware Video Acceleration Level for all your (Windows Server 2003 and Powered On) VMās to Full. This way you can always enjoy smooth mouse movements when working in the console!
A link to Hugoās website will definitely appear in my presentation at the 12th of December.
Wednesday, October 15. 2008
/n software released NetCmdlets V2.0 - BETA
The /n software NetCmdlets extend the features of Microsoft Windows PowerShell with a broad range of network management and messaging capabilities. The current release contains more than 30 Cmdlets providing access to network and host protocols such as SNMP, LDAP, DNS, Syslog, HTTP, WebDav, FTP, SMTP, POP, IMAP, Rexec/RShell, Telnet, and more.
NetCmdlets V2 is packed full of exciting new features including PowerShell Server (formerly PowerShell Remoting), Parameter Sets, Object Pipelining, and new Cmdlets for SSH Enabled Remoting and Amazon Web Services (S3) Integration.
Friday, October 10. 2008
PowerShell one-liners at PeetersOnline.nl
We can expect some challenging one-liners again since Hugo Peeters is back from his vacation. Hugo was offline the past few weeks enjoying the luxury live in California. During the VMworld in Las Vegas Hugoās site peetersonline.nl was mentioned in the PowerShell presentation from Carter Shanklin. After Carterās presentation ended I was able to attend a little interview where he mentioned Hugoās site again. Hugo already posted two new articles:
Some advice on creating Powershell scripts
Creating a Powershell script CAN be quite difficult. How to get the output you want? Where to start? Let me try to get you started by providing a structure you can follow. Iām not saying this is THE way, but itās MY way. Hope it helps you and please do comment if you have additions or another way!
Changing your VMware license server
Hi everybody, Iām back! Before you ask, Iāve had a great holiday, thank you. Now letās continue having fun with Powershell and the VI Toolkit! Iāve showed you a trick earlier that allows you to find your Virtual Center Server Settings. The License Server settings for instance. But changing these settings can prove to be quite a challenge.
Monday, October 6. 2008
ESX Automated Configuration Midwife
Lance Berc, Corporate ArchitectĀ over at VMware created some PowerShell scripts to automate the ESX configuration.These scripts automate much of the drudgery needed to incorporate a fresh ESXi or ESX Classic Server into a Virtual Center DRS cluster. Automation is the backbone of scalability. Via Vinternals.
Lance Berc : Configure freshly booted ESX with PowerShell
Wednesday, October 1. 2008
A poor menās VMotion
Mike DiPetrillo over at VMware posted a PowerShell script on his weblog. This script is able to Quick Migrate a VMware virtual machine from one ESX server to the other.
One of the things that was also brought up over and over again in the debate was the fact that Quick Migration was free and came with Hyper-V since it was based on Microsoft Clustering whereas VMware VMotion was only available in the most expensive Enterprise SKU of VMware Infrastructure. So there it was - I need to create Quick Migration for the lower priced and free VMware solutions. I went off, built my little script, and showed it off at VMworld. There was a GREAT response to it so I'm posting it here for others to use or improve upon however you see fit.