<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Professional VMware &#187; automation</title>
	<atom:link href="http://professionalvmware.com/category/automation/feed/" rel="self" type="application/rss+xml" />
	<link>http://professionalvmware.com</link>
	<description>How Many Turtles Can You Fit On A Rock?</description>
	<lastBuildDate>Mon, 19 Jul 2010 20:47:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<!-- podcast_generator="podPress/8.8" - maintenance_release="8.8.5.3" -->
	<copyright>Copyright &#xA9; 2010 Professional VMware http://creativecommons.org/licenses/by-nc-sa/2.5/</copyright>
	<managingEditor>podcast@professionalvmware.com (Cody Bunch)</managingEditor>
	<webMaster>podcast@professionalvmware.com (Cody Bunch)</webMaster>
	<category>podcast</category>
	<ttl>1440</ttl>
	<image>
		<url>http://professionalvmware.com/wp-content/plugins/podpress/images/powered_by_podpress.jpg</url>
		<title>Professional VMware &#187; automation</title>
		<link>http://professionalvmware.com</link>
		<width>144</width>
		<height>144</height>
	</image>
	<itunes:subtitle>ProfessionalVMware BrownBag Series</itunes:subtitle>
	<itunes:summary>ProfessionalVMware BrownBag Series</itunes:summary>
	<itunes:keywords></itunes:keywords>
	<itunes:category text="Technology" />
	<itunes:category text="Technology">
		<itunes:category text="Podcasting" />
	</itunes:category>
	<itunes:category text="Technology">
		<itunes:category text="Software How-To" />
	</itunes:category>
	<itunes:author>Cody Bunch</itunes:author>
	<itunes:owner>
		<itunes:name>Cody Bunch</itunes:name>
		<itunes:email>podcast@professionalvmware.com</itunes:email>
	</itunes:owner>
	<itunes:block>no</itunes:block>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://professionalvmware.com/wp-content/plugins/podpress/images/ProVmwarePodcast.jpg" />
		<item>
		<title>Add a vSwitch, PowerCLI vs. vCLI</title>
		<link>http://professionalvmware.com/2010/03/add-a-vswitch-powercli-vs-vcli/</link>
		<comments>http://professionalvmware.com/2010/03/add-a-vswitch-powercli-vs-vcli/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 15:46:00 +0000</pubDate>
		<dc:creator>bunchc</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[esxi]]></category>
		<category><![CDATA[vCLI]]></category>
		<category><![CDATA[vMA]]></category>
		<category><![CDATA[vSphere]]></category>
		<category><![CDATA[vima]]></category>

		<guid isPermaLink="false">http://professionalvmware.com/2010/03/add-a-vswitch-powercli-vs-vcli/</guid>
		<description><![CDATA[In trying to get used to ESXi and it’s console-less nature I’ve been forcing myself to use the vCLI or PowerCLI to do things. Along the way I’ve learned that the vCLI is generally really well though out, if different. Here is an example of this: Setting up a vNetwork Standard Switch (vSwitch) using PowerCLI [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>In trying to get used to ESXi and it’s console-less nature I’ve been forcing myself to use the vCLI or PowerCLI to do things. Along the way I’ve learned that the vCLI is generally really well though out, if different. Here is an example of this: Setting up a vNetwork Standard Switch (vSwitch) using PowerCLI and the vCLI:</p>
<h4>PowerCLI</h4>
<ol>Steps:
<li>Connect to the ESXi or vCenter server:      <br /><font color="#004000" size="2" face="Courier New">Get-Credential | Connect-VIServer –Server 1.2.3.4</font> </li>
<li>Create the new vSwitch:      <br /><font color="#004000" size="2" face="Courier New">Get-VMHost –Name “ESX Host” | New-VirtualSwitch –Name “NewSwitch”</font></li>
</ol>
<p>A very basic example that, no uplinks and the like, but it does show that the action is very straight forward in PowerCLI.</p>
<h4>vCLI</h4>
<p>This one is actually much much more complicated than the above (not really, but well…)</p>
<p><font color="#004000" size="2" face="Courier New">vicfg-vswitch.pl &#8211;add vSwitch1 &#8211;server 1.2.3.4 &#8211;username root &#8211;password yourP4ssword</font></p>
<h4>Conclusion</h4>
<p> There you go. Two one liners to add a vSwitch to your ESXi (or ESX) host. Both are simpler than I’d thought. Questions? Comments? Drop a line in the comments or hit me up on Twitter (<a href="http://twitter.com/cody_bunch">@cody_bunch</a>)  </p>
]]></content:encoded>
			<wfw:commentRss>http://professionalvmware.com/2010/03/add-a-vswitch-powercli-vs-vcli/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>vSphere Host Died Abandon Ship! &#8211; vSphere vCenter Alarms &amp; Actions</title>
		<link>http://professionalvmware.com/2010/01/vsphere-host-died-abandon-ship-vsphere-vcenter-alarms-actions/</link>
		<comments>http://professionalvmware.com/2010/01/vsphere-host-died-abandon-ship-vsphere-vcenter-alarms-actions/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 16:08:00 +0000</pubDate>
		<dc:creator>bunchc</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[vCenter]]></category>
		<category><![CDATA[vSphere]]></category>

		<guid isPermaLink="false">http://professionalvmware.com/2010/01/vsphere-host-died-abandon-ship-vsphere-vcenter-alarms-actions/</guid>
		<description><![CDATA[This came up recently on the VMware Virtualization group on LinkedIn. The question was essentially: “In the event of a host hardware issue, can I VMotion my VMs off the host and send a notification?” The answer is: “Most Certainly!” This can be done by setting up a vSphere vCenter Alarm and corresponding action. Let’s [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>This came up recently on the VMware Virtualization group on LinkedIn. The question was essentially: “In the event of a host hardware issue, can I VMotion my VMs off the host and send a notification?” The answer is: “Most Certainly!” This can be done by setting up a vSphere vCenter Alarm and corresponding action. Let’s explore:</p>
<p>Fire up the vCenter client. Select the level you want to be alerted from then select “Alarms”:</p>
<p><a href="http://professionalvmware.com/wp-content/uploads/2010/01/Windows7201001231452061.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Windows7-20100123-145206[1]" border="0" alt="Windows7-20100123-145206[1]" src="http://professionalvmware.com/wp-content/uploads/2010/01/Windows7201001231452061_thumb.jpg" width="446" height="145" /></a>&#160; <br />Note, there are quite a few default alarms, one of them may work for you:</p>
<p><a href="http://professionalvmware.com/wp-content/uploads/2010/01/Windows7201001231454001.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Windows7-20100123-145400[1]" border="0" alt="Windows7-20100123-145400[1]" src="http://professionalvmware.com/wp-content/uploads/2010/01/Windows7201001231454001_thumb.jpg" width="451" height="146" /></a>&#160;</p>
<p>For ours, we want something a bit more generic, so right click somewhere in the empty space, and choose “New Alert”:</p>
<p><a href="http://professionalvmware.com/wp-content/uploads/2010/01/Windows7201001231457281.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Windows7-20100123-145728[1]" border="0" alt="Windows7-20100123-145728[1]" src="http://professionalvmware.com/wp-content/uploads/2010/01/Windows7201001231457281_thumb.jpg" width="439" height="281" /></a> </p>
<p>Fill in the details with something that makes sense for your environment. I went with “Generic Host Health Alert”. Make sure to select “Hosts” and the second radio button. Done? Then we’re ready to move on to the “Triggers” tab.</p>
<p>Select Add, then “Hardware Health Changed”, then change the “Status”. I went with “Alert”, like this:</p>
<p><a href="http://professionalvmware.com/wp-content/uploads/2010/01/Windows7201001231500241.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Windows7-20100123-150024[1]" border="0" alt="Windows7-20100123-150024[1]" src="http://professionalvmware.com/wp-content/uploads/2010/01/Windows7201001231500241_thumb.jpg" width="446" height="67" /></a>&#160;</p>
<p>Got that so far? Awesome! Next we move onto the actions:</p>
<p><a href="http://professionalvmware.com/wp-content/uploads/2010/01/Windows7201001231505141.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Windows7-20100123-150514[1]" border="0" alt="Windows7-20100123-150514[1]" src="http://professionalvmware.com/wp-content/uploads/2010/01/Windows7201001231505141_thumb.jpg" width="444" height="99" /></a> </p>
<p>For this you will configure the “Send a notification email” to an address of your choice. Then you’ll add “Enter maintenance mode”</p>
<p>And with that, select “OK”. You’ve now configured your vSphere vCenter to notify you of a hardware failure, and to migrate your VMs to another host. Note: This will only work if you have clustered hosts, and then only within the capacity of the cluster. Further, depending on the hardware issue, VMotion may not be an option, and you are then dependant on VMware HA. If this was helpful or you have any questions, drop us a line in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://professionalvmware.com/2010/01/vsphere-host-died-abandon-ship-vsphere-vcenter-alarms-actions/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>The Most Awesome PowerCLI Cmdlet You Aren&#8217;t Using</title>
		<link>http://professionalvmware.com/2009/11/the-most-awesome-powercli-cmdlet-you-arent-using/</link>
		<comments>http://professionalvmware.com/2009/11/the-most-awesome-powercli-cmdlet-you-arent-using/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 15:03:00 +0000</pubDate>
		<dc:creator>bunchc</dc:creator>
				<category><![CDATA[VM]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">http://professionalvmware.com/2009/11/the-most-awesome-powercli-cmdlet-you-arent-using/</guid>
		<description><![CDATA[While all of PowerCLI is remarkable in both it’s power and ease of use, there are some cmdlets that do not get as much airtime as they deserve. One of those, is Invoke-VMScript. From Get-Help InvokeVMScript
NAME     &#160;&#160;&#160; Invoke-VMScript 
SYNOPSIS     &#160;&#160;&#160; Executes the specified PowerShell script in the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>While all of PowerCLI is remarkable in both it’s power and ease of use, there are some cmdlets that do not get as much airtime as they deserve. One of those, is Invoke-VMScript. From Get-Help InvokeVMScript</p>
<blockquote><p>NAME     <br />&#160;&#160;&#160; Invoke-VMScript </p>
<p>SYNOPSIS     <br />&#160;&#160;&#160; Executes the specified PowerShell script in the guest OS of each of the specified virtual machines. </p>
<p>SYNTAX     <br />&#160;&#160;&#160; Invoke-VMScript [-ScriptText] &lt;String&gt; [-VM] &lt;VirtualMachine[]&gt; [-HostCredential &lt;PSCredential&gt;] [-HostUser &lt;String&gt;] [-HostPassword &lt;SecureString&gt;] [-GuestCredential &lt;PSCredential&gt;] [-GuestUser &lt;String&gt;] [-GuestPassword &lt;SecureString&gt;] [-ToolsWaitSecs &lt;Int32&gt;] [-Server &lt;VIServer[]&gt;] [-WhatIf] [-Confirm] [&lt;CommonParameters&gt;] </p>
<p>DETAILED DESCRIPTION     <br />&#160;&#160;&#160; Executes the specified PowerShell script in the guest OS of each of the specified virtual machines. The virtual machines must be powered on and have PowerShell and VM Tools installed. In order to authenticate with the host or the guest OS, one of the HostUser/HostPassword (GuestUser/GuestPassword) pair and HostCredential (GuestCredential) parameters must be provided. </p>
</blockquote>
<p>Take a close look at the synopsis line, in fact, read it again. I’ll wait. Done? Good. Invoke-VMScript executes a specified PowerShell script INSIDE the guest OS. Starting to feel the power? No? Fine, how bout a use case? It’s yearly inventory time. You know… that time. Your boss wants a list of all VM Names, build numbers, serials, versions, and some other random things. Now, one of two things happens, either you procrastinate and then need to extend your deadline so you can log into every box, OR you use the following one-liner:</p>
<p><font color="#ff8040" face="Courier New">get-vm | select -first 1 | %{ $_.Name; $_ | Invoke-VMScript -GuestUser &quot;adminUser&quot; -GuestPassword &quot;urPass&quot; -ScriptText &quot;get-wmiobjectwin32_operatingsystem&quot; -HostUser &quot;root&quot; -hostpassword &quot;rootPass&quot; } </font></p>
<p>That one liner (yes it is all one line) works kinda like this: Get a list of all my VMs, select the first one, then give me the name, and the output of get-wmiobjectwin32_operatingsystem. In turn, it produces the following output:</p>
<p>web.professionalvmware.com </p>
<p>SystemDirectory : C:\WINDOWS\system32   <br />Organization&#160;&#160;&#160; : ProfessionalVMware    <br />BuildNumber&#160;&#160;&#160;&#160; : 3790    <br />RegisteredUser&#160; : ProfessionalVMware    <br />SerialNumber&#160;&#160;&#160; : Your Serial Number here    <br />Version&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : 5.2.3790</p>
<p> Not convinced of Invoke-VMScript’s World Dominatingly Awesome Power? Well, let me know in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://professionalvmware.com/2009/11/the-most-awesome-powercli-cmdlet-you-arent-using/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Disabling Copy Paste &#8211; The PowerCLI way</title>
		<link>http://professionalvmware.com/2009/11/disabling-copy-paste-the-powercli-way/</link>
		<comments>http://professionalvmware.com/2009/11/disabling-copy-paste-the-powercli-way/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 13:39:00 +0000</pubDate>
		<dc:creator>bunchc</dc:creator>
				<category><![CDATA[automation]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">http://professionalvmware.com/2009/11/disabling-copy-paste-the-powercli-way/</guid>
		<description><![CDATA[Today I needed to disable the VMware tools/console copy &#38; paste functionality… on a lot of VMs (well… more than one is a lot). In doing this, I came across these directions from vmzare:
How To disable copy and paste operations between the guest operating system and remote console ?
1. Log on to the VI Client [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Today I needed to disable the VMware tools/console copy &amp; paste functionality… on a lot of VMs (well… more than one is a lot). In doing this, I came across these directions from <a href="http://vmzare.wordpress.com/2007/06/05/how-to-disable-copy-and-paste-operations-between-the-guest-operating-system-and-remote-console/">vmzare</a>:</p>
<blockquote><p>How To disable copy and paste operations between the guest operating system and remote console ?</p>
<p>1. Log on to the VI Client and select the virtual machine from the inventory panel.<br />
2. The configuration page for this virtual machine appears with the Summary tab displayed.<br />
3. Click Edit Settings.<br />
4. Click Options &gt; Advanced &gt; Configuration Parameters to open the Configuration<br />
5. Parameters dialog box.<br />
6. Click the Add button</p>
<p>Type the following values in the Name field Value column.</p>
<p>Name Field Value Field<br />
isolation.tools.copy.enable false<br />
isolation.tools.paste.enable false<br />
isolation.tools.setGUIOptions.enable false</p></blockquote>
<p>And they worked awesomely too. However to do this for more than a single VM, I needed a different plan of attack. Knowing I already had most of the script written from my <a href="http://professionalvmware.com/2009/10/powercli-script-of-the-week-set-keydelay-ps1/">set-keydelay.ps1</a> post. In fact, I only needed to change a few lines for this one, lovingly titled disable-copypasta.ps1:</p>
<p><script src="http://PoshCode.org/embed/1475" type="text/javascript"></script></p>
<p>Like set-keydelay, this will take a VM object from the pipeline, and apply our config settings. Note, the VM will likely need a reboot before the settings completely take effect. Hope this has been useful. If you have questions, drop a line in the comments, or on twitter <a href="http://twitter.com/cody_bunch">@cody_bunch</a></p>
<p><em>Note: Edited to include an updated, <strong>working</strong></em> Disable-CopyPasta.ps1</p>
]]></content:encoded>
			<wfw:commentRss>http://professionalvmware.com/2009/11/disabling-copy-paste-the-powercli-way/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>11 Awesome PowerCLI Resources</title>
		<link>http://professionalvmware.com/2009/10/10-awesome-powercli/</link>
		<comments>http://professionalvmware.com/2009/10/10-awesome-powercli/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 16:19:00 +0000</pubDate>
		<dc:creator>bunchc</dc:creator>
				<category><![CDATA[automation]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">http://professionalvmware.com/2009/10/10-awesome-powercli/</guid>
		<description><![CDATA[While searching for some snippets of VMware PowerCLI code earlier in the week I came across some awesome resources, both resources I’ve not seen/used before, as well as those that I’ve used, but have not linked prior. Note, that most of these are just the PowerCLI section of an equally awesome blog.

VMware PowerCLI Community
Get-Admin’s PowerCLI [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>While searching for some snippets of VMware PowerCLI code earlier in the week I came across some awesome resources, both resources I’ve not seen/used before, as well as those that I’ve used, but have not linked prior. Note, that most of these are just the PowerCLI section of an equally awesome blog.</p>
<ul>
<li><a href="http://vmware.com/go/powershell">VMware PowerCLI Community</a></li>
<li><a href="http://get-admin.com/blog/?cat=44">Get-Admin’s PowerCLI Section</a></li>
<li><a href="http://www.peetersonline.nl/index.php/tag/powercli/">Peeters Online, PowerCLI Section</a></li>
<li><a href="http://www.virtu-al.net/">Virtu-Al</a> – PowerCLI Everything!</li>
<li><a href="http://halr9000.com/">Hal Rottenberg’s Blog</a> – The man wrote the book on PowerCLI &amp; VMware. <a href="http://www.amazon.com/gp/product/0982131402?ie=UTF8&amp;tag=tri01-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0982131402">Really</a><img class="wqmtyzxrsllyaqqivcuz wqmtyzxrsllyaqqivcuz" style="border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important" src="http://www.assoc-amazon.com/e/ir?t=tri01-20&amp;l=as2&amp;o=1&amp;a=0982131402" border="0" alt="" width="1" height="1" />.</li>
<li><a href="http://lucd.info/">LucD’s Blog</a> – Luc is a PowerCLI God… really</li>
<li><a href="http://ict-freak.nl/tag/powercli/">ICT-Freak.NL</a> – Some awesome examples, snippets, etc</li>
<li><a href="http://www.ntpro.nl/blog/categories/10-VMware-PowerShell">Eric Sloof’s PowerShell Section</a> – Just as good as the rest</li>
<li><a href="http://vinternals.com/powercli-mastery/">vinternals PowerCLI Mastery</a></li>
<li><a href="http://blogs.vmware.com/vipowershell/">Carter Shanklin’s PowerCLI Blog</a> @ VMware</li>
<li><a href="http://www.vcritical.com/tag/powercli/">vCritical’s PowerCLI Section</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://professionalvmware.com/2009/10/10-awesome-powercli/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>vSphere SDK &#8211; The Book!</title>
		<link>http://professionalvmware.com/2009/10/vsphere-sdk-the-book/</link>
		<comments>http://professionalvmware.com/2009/10/vsphere-sdk-the-book/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 12:16:00 +0000</pubDate>
		<dc:creator>bunchc</dc:creator>
				<category><![CDATA[VI3]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[vSphere]]></category>
		<category><![CDATA[sdk]]></category>

		<guid isPermaLink="false">http://professionalvmware.com/2009/10/vsphere-sdk-the-book/</guid>
		<description><![CDATA[ I just received my copy of Steve Jin’s “VMware VI and vSphere SDK: Managing the VMware Infrastructure and vSphere ”, 
As I tech edited the book I’ll not post a long review, other than to say that the book is a good resource, and overall a good book. If you are, or will be [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><a href="http://www.amazon.com/gp/product/0137153635?ie=UTF8&amp;tag=tri01-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0137153635"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="51AM5rbW-QL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU01_[1]" border="0" alt="51AM5rbW-QL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU01_[1]" align="left" src="http://professionalvmware.com/wp-content/uploads/2009/10/51AM5rbWQL._BO2204203200_PIsitbstickerarrowclickTopRight3576_AA240_SH20_OU01_1.jpg" width="244" height="244" /></a> I just received my copy of Steve Jin’s “<a href="http://www.amazon.com/gp/product/0137153635?ie=UTF8&amp;tag=tri01-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0137153635">VMware VI and vSphere SDK: Managing the VMware Infrastructure and vSphere</a><img style="border-bottom-style: none !important; border-right-style: none !important; margin: 0px; border-top-style: none !important; border-left-style: none !important" border="0" alt="" src="http://www.assoc-amazon.com/e/ir?t=tri01-20&amp;l=as2&amp;o=1&amp;a=0137153635" width="1" height="1" /> ”, </p>
<p>As I tech edited the book I’ll not post a long review, other than to say that the book is a good resource, and overall a good book. If you are, or will be programming using the VI or vSphere SDK’s, you’ll want to start here.</p>
<p>From Amazon:</p>
<blockquote><p>Jin walks you through using the VI SDK and cloud-computing vSphere SDK to manage ESX servers, ESX clusters, and VirtualCenter servers in any environment–no matter how complex. Drawing on his extensive expertise working with VMware strategic partners and enterprise customers, he places the VI SDK in practical context, presenting realistic samples and proven best practices for building robust, effective solutions. Jin demonstrates how to manage every facet of a VMware environment, including inventory, host systems, virtual machines (VMs), snapshots, VMotion, clusters, resource pools, networking, storage, data stores, events, alarms, users, security, licenses, and scheduled tasks.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://professionalvmware.com/2009/10/vsphere-sdk-the-book/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kodiak LUA Scripting</title>
		<link>http://professionalvmware.com/2009/05/kodiak-lua-scripting/</link>
		<comments>http://professionalvmware.com/2009/05/kodiak-lua-scripting/#comments</comments>
		<pubDate>Wed, 20 May 2009 11:36:20 +0000</pubDate>
		<dc:creator>bunchc</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[bluebear]]></category>
		<category><![CDATA[kodiak]]></category>

		<guid isPermaLink="false">http://professionalvmware.com/2009/05/20/kodiak-lua-scripting/</guid>
		<description><![CDATA[I told you it was the big feature didn’t I” While I’m a PowerShell man at heart, there is something to be said, for having a cross platform, potentially hypervisor agnostic scripting engine, that is tied not just into your virtual infrastructure, but also into your management platform.
Take a look at a few of the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I told you it was the big feature didn’t I” While I’m a PowerShell man at heart, there is something to be said, for having a cross platform, potentially hypervisor agnostic scripting engine, that is tied not just into your virtual infrastructure, but also into your management platform.</p>
<p>Take a look at a few of the examples from the <a href="http://www.bluebear.org/wiki/display/docs/Scripting">BlueBear site</a>:</p>
<p><a href="http://professionalvmware.com/wp-content/uploads/2009/05/20090520-0634.png"><img title="2009-05-20_0634" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="296" alt="2009-05-20_0634" src="http://professionalvmware.com/wp-content/uploads/2009/05/20090520-0634-thumb.png" width="578" border="0" /></a> </p>
<p>No, that isn’t selectable. At least not from here, but you can copy/paste it from the BlueBear site linked above. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://professionalvmware.com/2009/05/kodiak-lua-scripting/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Managing Your vCenter Events with PowerShell</title>
		<link>http://professionalvmware.com/2009/01/managing-your-vcenter-events-with-powershell/</link>
		<comments>http://professionalvmware.com/2009/01/managing-your-vcenter-events-with-powershell/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 17:04:00 +0000</pubDate>
		<dc:creator>bunchc</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[VI Toolkit]]></category>
		<category><![CDATA[VI3]]></category>
		<category><![CDATA[Virtual Infrastructure]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://professionalvmware.com/2009/01/20/managing-your-vcenter-events-with-powershell/</guid>
		<description><![CDATA[While great, managing events with the the VI Client can be a pain. No search functionality, old events fall off the list, etc, etc. So what is an admin to do?
A resourceful admin will have been playing with the VI Toolkit, and would have found the get-vievent cmdlet. Let’s take a look at how we [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>While great, managing events with the the VI Client can be a pain. No search functionality, old events fall off the list, etc, etc. So what is an admin to do?</p>
<p>A resourceful admin will have been playing with the VI Toolkit, and would have found the <strong>get-vievent </strong>cmdlet. Let’s take a look at how we can manage VI Events using this cmdlet in a few different scenarios:</p>
<p>First lets see what this cmdlet can do for us:</p>
<p><a href="http://professionalvmware.com/wp-content/uploads/2009/01/image3.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="image" src="http://professionalvmware.com/wp-content/uploads/2009/01/image-thumb3.png" border="0" alt="image" width="390" height="263" /></a></p>
<p>Cool! So here I point out a limitation of the cmdlet (or VI, or both) It will only return 1000 events, that’s it:</p>
<p><span style="font-family: Courier New;">PS C:\&gt; get-vievent -MaxSamples 1000 | Measure-Object</span></p>
<p><span style="font-family: Courier New;">Count    : 1000<br />
</span><span style="font-family: Courier New;">PS C:\&gt; get-vievent -MaxSamples 1350 | Measure-Object </span></p>
<p><span style="font-family: Courier New;">Count    : 1000<br />
</span>That doesn’t make sense does it? Not sure if it’s a bug or not, but with some of the other filters, you can really dig into your events without having to get more than the first thousand.</p>
<p>Lets take a look at how to get a list of the first 3 errors for my VI specifically:</p>
<p><span style="font-family: Courier New;">get-vievent -MaxSamples 3 -types error</span></p>
<p><span style="font-family: Courier New;"><a href="http://professionalvmware.com/wp-content/uploads/2009/01/20090118-1618.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="2009-01-18_1618" src="http://professionalvmware.com/wp-content/uploads/2009/01/20090118-1618-thumb.png" border="0" alt="2009-01-18_1618" width="411" height="404" /></a> </span></p>
<p>Cool? Lets take a look at what this looks like… if I wanted the first 3 events on a particular host:</p>
<p><span style="font-family: Courier New;">PS C:\&gt; get-vievent -MaxSamples 3 -Entity (get-vmhost|select -First 1)</span></p>
<p><a href="http://professionalvmware.com/wp-content/uploads/2009/01/20090118-1621.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="2009-01-18_1621" src="http://professionalvmware.com/wp-content/uploads/2009/01/20090118-1621-thumb.png" border="0" alt="2009-01-18_1621" width="422" height="370" /></a></p>
<p>Let’s combine that, and the start &amp; finish switches, to get 3 error events from our ESX server, from last Tuesday to last Thursday:</p>
<p><span style="font-family: Courier New;">PS C:\&gt; get-vievent -MaxSamples 3 -Start 01/13/2009 -Finish 01/15/2009 -Entity (get-vmhost | select -First 1)</span></p>
<p><a href="http://professionalvmware.com/wp-content/uploads/2009/01/20090118-1624.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="2009-01-18_1624" src="http://professionalvmware.com/wp-content/uploads/2009/01/20090118-1624-thumb.png" border="0" alt="2009-01-18_1624" width="449" height="187" /></a></p>
<p>So, even with the 1000 event limitation, it’s still a pretty powerful cmdlet, no?</p>
<p>Questions? Leave them in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://professionalvmware.com/2009/01/managing-your-vcenter-events-with-powershell/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Answering VM Questions With PowerShell</title>
		<link>http://professionalvmware.com/2009/01/answering-vm-questions-with-powershell/</link>
		<comments>http://professionalvmware.com/2009/01/answering-vm-questions-with-powershell/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 17:35:02 +0000</pubDate>
		<dc:creator>bunchc</dc:creator>
				<category><![CDATA[VI Toolkit]]></category>
		<category><![CDATA[VI3]]></category>
		<category><![CDATA[Virtual Infrastructure]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://professionalvmware.com/2009/01/18/answering-vm-questions-with-powershell/</guid>
		<description><![CDATA[Because there is an answer for everything and for everything that answer is PowerShell. Sometimes in your Virtual Infrastructure, you will have a need to answer a question or two. Normally these questions are put to you by vCenter: “Did you copy or move this VM?”, “Is today your birthday?”, “Who shot Kennedy?”.
For Example:

So I [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Because there is an answer for everything and for everything that answer is PowerShell. Sometimes in your Virtual Infrastructure, you will have a need to answer a question or two. Normally these questions are put to you by vCenter: “Did you copy or move this VM?”, “Is today your birthday?”, “Who shot Kennedy?”.</p>
<p>For Example:</p>
<p><a href="http://professionalvmware.com/wp-content/uploads/2009/01/image1.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="image" src="http://professionalvmware.com/wp-content/uploads/2009/01/image-thumb1.png" border="0" alt="image" width="518" height="275" /></a></p>
<p>So I had to stage this screenshot, but it’s something that will happen when you have VMs that have the same UUID in your vCenter. Straight forward, no? The right answer in this case, since I have two of these VMs is to “Create”. Two clicks, done.</p>
<p>What if you had to do this for 300 VMs? A bit more cumbersome then. 300 * 3 = 900 clicks (Changing VMs is a click too) and then heavens forbid you miss, and have duplicate UUIDs out there.</p>
<p>So, how do we do this in my automation tool of choice: PowerShell? First we take a look around… Courtsy of Mr Rottenberg:</p>
<div class="csharpcode">
<pre class="alt">PS &gt; $a = Get-VM myvm | Get-View</pre>
<pre>PS &gt; $a | gm *answer*</pre>
<pre class="alt"></pre>
<pre>   TypeName: VMware.Vim.VirtualMachine</pre>
<pre class="alt"></pre>
<pre>Name     MemberType Definition</pre>
<pre class="alt">----     ---------- ----------</pre>
<pre>AnswerVM Method     System.Void AnswerVM(String questionId, String answerChoice)</pre>
</div>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>Cool, so how do we get the questionID? We search a bit, and find <a href="http://www.vmware.com/support/developer/vc-sdk/visdk25pubs/ReferenceGuide/vim.vm.QuestionInfo.html">“QuestionInfo”</a></p>
<pre class="csharpcode">PS C:\&gt; $ans.Runtime.Question

Id              : 0
Text            : msg.uuid.moved:The location of <span class="kwrd">this</span> <span class="kwrd">virtual</span> machine's configu
                  ration file has changed since it was last powered on.

                  If the <span class="kwrd">virtual</span> machine has been copied, you should create a n
                  ew unique identifier (UUID).  If it has been moved, you shoul
                  d keep its old identifier.

                  If you are not sure, create a <span class="kwrd">new</span> identifier.

                  What <span class="kwrd">do</span> you want to <span class="kwrd">do</span>?
Choice          : VMware.Vim.ChoiceOption
Message         :
DynamicType     :
DynamicProperty :</pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>Cool… Getting closer. Choice Option? Digging deeper:</p>
<pre class="csharpcode">PS C:\&gt; $ans.Runtime.Question.Choice.ChoiceInfo

Key             : 1
Label           : Create
Summary         : Create
DynamicType     :
DynamicProperty :

Key             : 2
Label           : Keep
Summary         : Keep
DynamicType     :
DynamicProperty :

Key             : 3
Label           : Always Create
Summary         : Always Create
DynamicType     :
DynamicProperty :

Key             : 4
Label           : Always Keep
Summary         : Always Keep
DynamicType     :
DynamicProperty :

Key             : 0
Label           : Cancel
Summary         : Cancel
DynamicType     :
DynamicProperty :</pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>Looks like we now have enough to work with… So lets answer that question:</p>
<pre class="csharpcode">PS C:\&gt; $ans.AnswerVM(0,1)</pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p><a href="http://professionalvmware.com/wp-content/uploads/2009/01/image2.png"><img style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" title="image" src="http://professionalvmware.com/wp-content/uploads/2009/01/image-thumb2.png" border="0" alt="image" width="472" height="277" /></a></p>
<p>And with that the VM powered on. Building this into a larger script will be left as an exercise for the reader. What, don&#8217;t like to exercise? Fine, post a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://professionalvmware.com/2009/01/answering-vm-questions-with-powershell/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>VMware &#8211; An Introduction To Scripting VI Using Perl or PowerShell</title>
		<link>http://professionalvmware.com/2009/01/vmware-an-introduction-to-scripting-vi-using-perl-or-powershell/</link>
		<comments>http://professionalvmware.com/2009/01/vmware-an-introduction-to-scripting-vi-using-perl-or-powershell/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 21:15:00 +0000</pubDate>
		<dc:creator>bunchc</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[VI Toolkit]]></category>
		<category><![CDATA[VM]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[Virtual Infrastructure]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://professionalvmware.com/2009/01/15/vmware-an-introduction-to-scripting-vi-using-perl-or-powershell/</guid>
		<description><![CDATA[These slides look to have been released after last years VMworld, and provide a great introduction to scripting and automation with the VMware tools.
Link!
The labs will help you get started with scripting VMware Infrastructure to enable automation, extensibility, and integration with existing tools. When we ran this at VMworld, we had about 600 attendees and [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>These slides look to have been released after last years VMworld, and provide a great introduction to scripting and automation with the VMware tools.</p>
<p><a href="http://communities.vmware.com/blogs/DeveloperCenter/2009/01/14/an-introduction-to-scripting-vi-using-perl-or-powershell">Link!</a></p>
<blockquote><p>The labs will help you get started with scripting VMware Infrastructure to enable automation, extensibility, and integration with existing tools. When we ran this at VMworld, we had about 600 attendees and it was so popular some students camped out in line to attend the lab a second time. We had so many folks request a way to share this with their teams that we decided to publish the whole thing for the community. </p>
<p>The lab is available in two versions: one shows how to use the VI Perl Toolkit and the other shows how to use the PowerShell-based VI Toolkit (for Windows). The attached files contain the manuals for both versions of the lab and the exercises for both versions of the lab. </p>
<p>The lab takes 2-3 hours to complete (not including the time to set the environment up first), but is conveniently split into 20 minute exercises. You’ll walk away with a better understanding of VMware Infrastructure, resources for using the toolkits, and a variety of useful scripts for performing common administrative tasks. The exercises cover triggering tasks, examining VM attributes, performing actions on VMs, and exporting performance data</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://professionalvmware.com/2009/01/vmware-an-introduction-to-scripting-vi-using-perl-or-powershell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
