During the installation of the Update Manager, you can select to install the optional VMware Infrastructure Update Manager ā PowerShell Library. VMware Update Manager ā PowerShell Library is a set of commandlets for scanning and remediating virtual machines or hosts, downloading software updates, and creating baselines. It can be installed and used on any machine that has VMware Infrastructure Toolkit (for Windows) installed and access to a VirtualCenter Server. VMware Infrastructure Update Manager ā PowerShell Library is an experimental feature and is supported only in English.
Saturday, July 26. 2008
VMware Infrastructure Update Manager - PowerShell Library
PowerScripting Podcast Episode 34 ā VMware in the House
Jonathan Walz & Hal Rottenberg, the guys behind the PowerScripting Podcast have a great show lined up for you.Ā They will be talking to Carter Shanklin from VMware about their PowerShell Toolkit.Ā Heās got some exciting NEW news to share with us, so thatās cool.Ā They also bring you news, resources, tips and whatever else they can scrape up.
Thursday, July 24. 2008
Who's the best PowerShell scripter?
Do you think you have what it takes to be the best PowerShell scripter? VMware is challenging the worldās VI administrators to a contest of skill, creativity and raw scripting talent. If you think you have what it takes to be the best and an all expenses paid trip to VMworld Las Vegas is your cup of tea ā this is for you.
Prizes:
Make sure you use the Latest Released Version: 1.0 | 07/25/08 | 103777 | 2.54 MBĀ :-)
Wednesday, July 23. 2008
Carter Shanklin about the GA of the VI Toolkit
Jonathan Walz & Hal Rottenberg, the guys behind the PowerScripting Podcast interviewed Carter Shanklin. In Episode 34 they spoke with Carter, a Product Manager over at VMware about the VI Toolkit for Windows. The VI Toolkit will become general availableĀ this weekendĀ and will contain a lot of new CmdLetās. Hereās the output from a pre-GA build v1.0.101511 "Get-Command āpsssnapin vmware*". Carterās next project is the VIX API. The VMware VIX API allows you to automate VM and guest operations on VMware Server, Workstation and ESX. He started a blog about this subject recently. I also had the opportunity to ask Hal about the progress on his upcoming āManaging VMWare with Windows PowerShellā? book. Hal reported it's coming along. You can read his take on these and other technologies at his blog TechProsaic.
The VMware Infrastructure (VI) Toolkit (for Windows) 1.0 includes more than 120 cmdlets, a set of sample scripts, and a function library that make managing and automating the VMware Infrastructure easier than ever before.
Here's a link to my accidental discovery: Latest Released Version: 1.0 | 07/25/08 | 103777 | 2.54 MB
Tuesday, July 22. 2008
PowerShell Code Repository
PoshCode is a collection of PowerShell functions, scripts and modules that are free for public use. As you find things useful,Ā they only ask that you contribute back to the community.
Sunday, July 20. 2008
AutoIt VMware PowerShell script
AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI.Ā It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages. AutoItX is a DLL version of AutoIt v3 that provides a subset of the features of AutoIt via an ActiveX/COM and DLL interface. This means that you can add AutoIt-like features to your VMware PowerShell script.
Invoke-Item c:\windows\notepad.exe
Get-VIServer esx35.ntpro.local -User root -Password vmware
$autoitx=new-object -com autoitx3.control
$MyHost = Get-VMHost esx35.ntpro.local
$HostView = Get-View $MyHost.ID
$NetworkSystem = get-view $HostView.ConfigManager.NetworkSystem
$AllPortGroups = $NetworkSystem.NetworkInfo.Portgroup
$autoitx.winactivate("Untitled - Notepad","")
foreach ($HostPortGroup in $AllPortGroups){$autoitx.send($HostPortGroup.Spec.Name + "`r") }
Thursday, July 17. 2008
PowerShell PortGroup export script
I created a PowerShell script that makes an export of all the PortGroup names and VLANIDās to a CSV file. The next step is to import these setting into another ESX server. You can make your own contribution or follow the progress at this address. LucD from Belgium, thanks for your help.
Get-VIServerĀ vcserver.ntpro.local -User -Password
$MyHost = Get-VMHostĀ esx35.ntpro.localĀ
$HostView = Get-View $MyHost.ID
$NetworkSystem = get-view $HostView.ConfigManager.NetworkSystem
$AllPortGroups = $NetworkSystem.NetworkInfo.Portgroup
Foreach ($HostPortGroup in $AllPortGroups)
{$HostPortGroup.Spec | Select-Object Name,VlanId | Out-File -filepath "C:\portgroups.txt" -append}
Wednesday, July 16. 2008
PowerShell load balancing script
ESX Server hosts can use multipathing for failover. When one path from the ESX Server host to the SAN becomes unavailable, the host switches to another path. ESX Server hosts can also use multipathing for load balancing. To achieve better load balancing across paths, administrators can specify that the ESX Server host should switch paths under certain circumstances. Different settable options determine when the ESX Server host switches paths and what paths are chosen. Rob Mokkink created a load balancing PowerShel script that spreads even and odd LUNās over different HBA cards.
Tuesday, July 15. 2008
PowerShell ASP
PowerShellASP is an ASP-like template language for Web Applications; templates contain a mixture of markup (HTML, XML or whatever you want to generate) and inline PowerShell code. At runtime, templates/pages are fully translated to PowerShell code and executed as a single unit inside a PowerShell pipeline, with the results sent to the client browser.
Create Disaster Recovery Hard Drive
Justin Grote created this script out of a motivation of laziness. Since VM's proliferate so fast, most backup and disaster recovery solutions are a pain in the ass because you have to manually add and remove virtual machines to their backup processes. What if there was a way to automatically add and remove VM's to a backup solution simply because of where they are located in Virtualcenter? What if he had an automated DR solution to removable USB hard drives for my smaller clients that was FREE?
Hence this script. This script dynamically backs up all VM's in a particular Virtualcenter folder using VCB, and drops them out to a USB hard drive for disaster recovery purposes. If I don't want a VM backed up anymore, he simply takes it out of that folder.
Note that this also leverages the new networked method of VCB, so YOU DO NOT NEED A SAN AND DIRECT ACCESS TO THE LUNs.
The script is also flexible enough so that if you do have the SAN VCB configuration, you can do LAN-free backups with this method too.
Note that the query here is just an example. Any way you can return a list of VM's, you can give it to the backup-vm cmdlet.