<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">

<channel>
	<title>Geek after Five</title>
	
	<link>http://geekafterfive.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Tue, 22 May 2012 14:06:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain="geekafterfive.com" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" />
<image>
		<url>http://0.gravatar.com/blavatar/c01d5eece5eab656c984356160469db9?s=96&amp;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Geek after Five</title>
		<link>http://geekafterfive.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://geekafterfive.com/osd.xml" title="Geek after Five" />
	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/GeekAfterFive" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="geekafterfive" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://geekafterfive.com/?pushpress=hub" /><item>
		<title>vShield Edge Version Discovery with PowerCLI</title>
		<link>http://geekafterfive.com/2012/05/22/vshield-edge-version-discovery-with-powercli/</link>
		<comments>http://geekafterfive.com/2012/05/22/vshield-edge-version-discovery-with-powercli/#comments</comments>
		<pubDate>Tue, 22 May 2012 14:00:56 +0000</pubDate>
		<dc:creator>Jake</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[vCloud]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[vShield]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[vshield]]></category>
		<category><![CDATA[vsphere]]></category>

		<guid isPermaLink="false">http://geekafterfive.com/?p=601</guid>
		<description><![CDATA[When upgrading vShield Manager, your vShield Edge devices will not be upgraded until you restart them. If you are in a situation where you need to do manual scheduled upgrades, this script will help you keep track of all the old versions running in your environment. Note: This is a vSphere PowerCLI script should work [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=601&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When upgrading vShield Manager, your vShield Edge devices will not be upgraded until you restart them. If you are in a situation where you need to do manual scheduled upgrades, this script will help you keep track of all the old versions running in your environment.</p>
<p>Note: This is a vSphere PowerCLI script should work with both vCloud Director or regular vShield installs.</p>
<p><pre class="brush: powershell;">

$report = @()
$VSEs = Get-View -ViewType virtualmachine -Filter @{&quot;name&quot;=&quot;vse&quot;}

foreach ($vSE in $vSEs)
{

$vSEObject = New-Object PSObject
 Add-Member -MemberType NoteProperty -Name &quot;Name&quot; -Value $VSE.name -InputObject $vSEObject
 Add-Member -MemberType NoteProperty -Name &quot;Version&quot; -Value $VSE.config.vappconfig.product[0].version -InputObject $vSEObject
 Add-Member -MemberType NoteProperty -Name &quot;Network0&quot; -Value (Get-View -id $VSE.network[0].tostring()).name -InputObject $vSEObject
 Add-Member -MemberType NoteProperty -Name &quot;Network1&quot; -Value (Get-View -id $VSE.network[1].tostring()).name -InputObject $vSEObject

$report += $vSEObject
}

$highVer = ($report | Sort-Object -Property version -Descending)[0].version
$oldvSEs = $report | where {$_.version -ne $highVer}
$oldvSEs | Export-Csv $HOME\Desktop\oldvSEs.csv -NoTypeInformation

</pre></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekafterfive.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekafterfive.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekafterfive.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekafterfive.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekafterfive.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekafterfive.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekafterfive.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekafterfive.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekafterfive.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekafterfive.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekafterfive.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekafterfive.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekafterfive.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekafterfive.wordpress.com/601/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=601&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekafterfive.com/2012/05/22/vshield-edge-version-discovery-with-powercli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320ac6648e4ca57065e35ff8a6411296?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">Jake</media:title>
		</media:content>
	</item>
		<item>
		<title>Time Reporting with Outlook and Powershell</title>
		<link>http://geekafterfive.com/2012/05/18/time-reporting-with-outlook-and-powershell/</link>
		<comments>http://geekafterfive.com/2012/05/18/time-reporting-with-outlook-and-powershell/#comments</comments>
		<pubDate>Fri, 18 May 2012 19:06:01 +0000</pubDate>
		<dc:creator>Jake</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Microsoft Outlook]]></category>
		<category><![CDATA[outlook]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[report]]></category>
		<category><![CDATA[shared calendar]]></category>

		<guid isPermaLink="false">http://geekafterfive.com/?p=587</guid>
		<description><![CDATA[Do you work at a company that requires you to report your time? Are you curious how much time you are spending on different projects or duties? Hate having a separate tool just for time tracking and reporting? (me too!) My Outlook calendar makes for easy time tracking. It&#8217;s on my iPhone, my desktop, my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=587&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Do you work at a company that requires you to report your time?</p>
<p>Are you curious how much time you are spending on different projects or duties?</p>
<p>Hate having a separate tool just for time tracking and reporting? (me too!)</p>
<p>My Outlook calendar makes for easy time tracking. It&#8217;s on my iPhone, my desktop, my laptop, my home PC&#8230;but there are no reporting capabilities that I am aware of, and I am not going to buy an app or plugin that I have to manage.</p>
<p>What if I wanted to find out how much time the rest of my team is spending on something like &#8220;host maintenance?&#8221; They have their calendar shared with me, and I can see their categories, but I would still have to manually add up their time, force them to do double data entry to another app, or something else that requires double-data-entry.</p>
<p>I wrote this Powershell solution to figure out how much time a group of people were spending on &#8220;Sales Engineering,&#8221; and made a couple modifications for this post to allow different users and categories.</p>
<h2>Features:</h2>
<h4>Category</h4>
<p>use <strong>-category</strong> to add up time on. Only single category supported.</p>
<h4>Multiple calendars</h4>
<p>use <strong>-calendars</strong> to enter a single name like &#8220;Jake Robinson&#8221; or multiple in an array: @(&#8220;Jake Robinson&#8221;, &#8220;Alan Renouf&#8221;)</p>
<h4>Date Range</h4>
<p>By default the current week M-F will be reported. If you need something a little different, you can use <strong>-pickDates</strong> to bring up a graphical calendar to each start and end date (click the date then press enter). You can also use <strong>-rangeStart</strong> and <strong>-rangeEnd</strong> with something like this &#8220;5/24/2012&#8243;</p>
<h4>HTML or CSV output</h4>
<p>Outputs to HTML report by default, or use <strong>-csv</strong> to output to comma separated value file.</p>
<h2>Screenshots!</h2>
<div id="attachment_593" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/05/snag-0098.png"><img class="size-full wp-image-593" title="My Calendar" src="http://geekafterfive.files.wordpress.com/2012/05/snag-0098.png?w=490&h=283" alt="" width="490" height="283" /></a><p class="wp-caption-text">My Calendar</p></div>
<div id="attachment_592" class="wp-caption alignnone" style="width: 422px"><a href="http://geekafterfive.files.wordpress.com/2012/05/snag-0099.png"><img class="size-full wp-image-592" title="Categories" src="http://geekafterfive.files.wordpress.com/2012/05/snag-0099.png?w=490" alt=""   /></a><p class="wp-caption-text">Categories</p></div>
<div id="attachment_591" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/05/snag-0101.png"><img class="size-full wp-image-591" title="Example with pickDates" src="http://geekafterfive.files.wordpress.com/2012/05/snag-0101.png?w=490&h=218" alt="" width="490" height="218" /></a><p class="wp-caption-text">Example with pickDates</p></div>
<div id="attachment_590" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/05/snag-0103.png"><img class="size-full wp-image-590" title="HTML report" src="http://geekafterfive.files.wordpress.com/2012/05/snag-0103.png?w=490&h=334" alt="" width="490" height="334" /></a><p class="wp-caption-text">HTML report</p></div>
<div id="attachment_594" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/05/snag-0105.png"><img class="size-full wp-image-594" title="Example using rangeStart and rangeEnd to CSV" src="http://geekafterfive.files.wordpress.com/2012/05/snag-0105.png?w=490&h=79" alt="" width="490" height="79" /></a><p class="wp-caption-text">Example using rangeStart and rangeEnd to CSV</p></div>
<div id="attachment_589" class="wp-caption alignnone" style="width: 279px"><a href="http://geekafterfive.files.wordpress.com/2012/05/snag-0104.png"><img class="size-full wp-image-589" title="CSV output" src="http://geekafterfive.files.wordpress.com/2012/05/snag-0104.png?w=490" alt=""   /></a><p class="wp-caption-text">CSV output</p></div>
<h2>&#8230;and here&#8217;s the script!</h2>
<p><pre class="brush: powershell;">

#
# OutlookTimeReport.ps1
# Jake Robinson
# v1.2
#
#
#
#

param ( [DateTime] $rangeStart = (get-date -hour 0 -minute 0 -second 0).AddDays(-(get-date).DayOfWeek.value__),
 [DateTime] $rangeEnd = (get-date -hour 23 -minute 59 -second 59).AddDays(7-(get-date).DayOfWeek.value__),
 [String] $category,
 [String] $calendars,
 [switch] $csv,
 [switch] $pickdates)

function pick-date()
{
 $objForm = New-Object Windows.Forms.Form

$objForm.Text = &quot;Select a Date&quot;
 $objForm.Size = New-Object Drawing.Size @(190,190)
 $objForm.StartPosition = &quot;CenterScreen&quot;

$objForm.KeyPreview = $True

$objForm.Add_KeyDown({
 if ($_.KeyCode -eq &quot;Enter&quot;)
 {
 $dtmDate=$objCalendar.SelectionStart
 $objForm.Close()
 }
 })

$objForm.Add_KeyDown({
 if ($_.KeyCode -eq &quot;Escape&quot;)
 {
 $objForm.Close()
 }
 })

$objCalendar = New-Object System.Windows.Forms.MonthCalendar
 $objCalendar.ShowTodayCircle = $False
 $objCalendar.MaxSelectionCount = 1
 $objForm.Controls.Add($objCalendar)

$objForm.Topmost = $True

$objForm.Add_Shown({$objForm.Activate()})
 [void] $objForm.ShowDialog()

if ($dtmDate)
 {
 return $dtmDate
 }
}

if ($pickdates)
{
 [void] [System.Reflection.Assembly]::LoadWithPartialName(&quot;System.Windows.Forms&quot;)
 [void] [System.Reflection.Assembly]::LoadWithPartialName(&quot;System.Drawing&quot;)

 [DateTime] $pickedStart = pick-date
 [DateTime] $pickedEnd = pick-date

 If ($pickedStart -and $pickedEnd)
 {
 $rangeStart = $pickedStart
 $rangeEnd = $pickedEnd
 }
}

Add-Type -AssemblyName Microsoft.Office.Interop.Outlook

$class = @”
using Microsoft.Office.Interop.Outlook;public class MyOL
{
 public MAPIFolder GetCalendar(string userName)
 {
 Application oOutlook = new Application();
 NameSpace oNs = oOutlook.GetNamespace(&quot;MAPI&quot;);
 Recipient oRep = oNs.CreateRecipient(userName);
 MAPIFolder calendar = oNs.GetSharedDefaultFolder(oRep, OlDefaultFolders.olFolderCalendar);
 return calendar;
 }
}
“@

Add-Type $class -ReferencedAssemblies Microsoft.Office.Interop.Outlook

$outlook = new-object MyOL
$restriction = &quot;[End] &gt;= '{0}' AND [Start] &lt;= '{1}'&quot; -f $rangeStart.ToString(&quot;g&quot;), $rangeEnd.ToString(&quot;g&quot;)
$seArray = @()
foreach($se in $calendars)
{
 $seObject = New-Object PSObject
 $SECalendar = $outlook.GetCalendar($se)
 $appointments = $SECalendar.items
 $appointments.Sort(&quot;[Start]&quot;)
 $appointments.IncludeRecurrences = $true
 $SEappts = $appointments.Restrict($restriction) | where {$_.categories -match $category}
 $SEhours = ($SEappts | Measure-Object -Sum -Property duration).sum / 60
 Add-Member -MemberType noteproperty -Value $se -Name &quot;Team Member&quot; -InputObject $seObject
 Add-Member -MemberType noteproperty -Value $SEhours -Name &quot;Hours&quot; -InputObject $seObject
 $seArray += $seObject
}
$totalHours = ($seArray | measure-object -Sum -Property hours).sum
$totalsObject = New-Object PSObject
Add-Member -MemberType noteproperty -Value &quot;TOTAL HOURS&quot; -Name &quot;Team Member&quot; -InputObject $totalsObject
Add-Member -MemberType noteproperty -Value $totalHours -Name &quot;Hours&quot; -InputObject $totalsObject
$seArray += $totalsObject

if ($csv)
{
 $seArray | Export-Csv -NoTypeInformation -Path &quot;$HOME\desktop\OutlookTimeReport.csv&quot;
 Invoke-Item &quot;$HOME\desktop\OutlookTimeReport.csv&quot;
}
else
{
$seHTML = $seArray | ConvertTo-Html -Body &quot;&lt;/pre&gt;
&lt;h3&gt;$($category): $($rangeStart.ToString(&quot;MM.dd.yyyy&quot;)) - $($rangeEnd.ToString(&quot;MM.dd.yyyy&quot;))&lt;/h3&gt;
&lt;pre&gt;&quot;| Out-File &quot;$HOME\desktop\OutlookTimeReport.html&quot;
 Invoke-Item &quot;$HOME\desktop\OutlookTimeReport.html&quot;
}

 </pre></p>
<p> <br />
For more Powershell and Outlook fun, see <a href="http://www.virtu-al.net/2012/05/13/never-miss-an-appointment-again-with-powershell/" target="_blank">Alan&#8217;s post</a>!</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekafterfive.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekafterfive.wordpress.com/587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekafterfive.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekafterfive.wordpress.com/587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekafterfive.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekafterfive.wordpress.com/587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekafterfive.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekafterfive.wordpress.com/587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekafterfive.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekafterfive.wordpress.com/587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekafterfive.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekafterfive.wordpress.com/587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekafterfive.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekafterfive.wordpress.com/587/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=587&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekafterfive.com/2012/05/18/time-reporting-with-outlook-and-powershell/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320ac6648e4ca57065e35ff8a6411296?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">Jake</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/05/snag-0098.png" medium="image">
			<media:title type="html">My Calendar</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/05/snag-0099.png" medium="image">
			<media:title type="html">Categories</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/05/snag-0101.png" medium="image">
			<media:title type="html">Example with pickDates</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/05/snag-0103.png" medium="image">
			<media:title type="html">HTML report</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/05/snag-0105.png" medium="image">
			<media:title type="html">Example using rangeStart and rangeEnd to CSV</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/05/snag-0104.png" medium="image">
			<media:title type="html">CSV output</media:title>
		</media:content>
	</item>
		<item>
		<title>Import an OVF from your desktop to a vCloud Org Catalog</title>
		<link>http://geekafterfive.com/2012/05/03/import-an-ovf-from-your-desktop-to-a-vcloud-org-catalog/</link>
		<comments>http://geekafterfive.com/2012/05/03/import-an-ovf-from-your-desktop-to-a-vcloud-org-catalog/#comments</comments>
		<pubDate>Thu, 03 May 2012 15:42:56 +0000</pubDate>
		<dc:creator>Jake</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[vCloud]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[Import-CIVappTemplate]]></category>
		<category><![CDATA[ovf]]></category>
		<category><![CDATA[vCloud Director]]></category>
		<category><![CDATA[vcloud vapp template]]></category>

		<guid isPermaLink="false">http://geekafterfive.com/?p=582</guid>
		<description><![CDATA[Have you downloaded a really cool appliance in OVF and want to quickly upload it to your vCloud Director Org? The Web UI would be one way to do it, but I sometimes run into issues with the java uploader. Here&#8217;s a simple PowerCLI method to get your OVF appliance from your desktop into your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=582&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Have you downloaded a really cool appliance in OVF and want to quickly upload it to your vCloud Director Org? The Web UI would be one way to do it, but I sometimes run into issues with the java uploader.</p>
<p>Here&#8217;s a simple PowerCLI method to get your OVF appliance from your desktop into your Org:</p>
<p><pre class="brush: powershell;">

$ovfPath = &quot;C:\users\me\desktop\MyCoolAppliance.ovf&quot;

$orgVdc = Get-OrgVdc &quot;My Org vDC&quot;

$catalog = Get-Catalog &quot;My Catalog&quot;

Import-CIVAppTemplate -SourcePath $ovfPath -OrgVdc $orgVdc -Catalog $catalog

</pre></p>
<p>As a subjective observation, it seems to run a lot faster than the Java uploader, but pending a real speed test, it&#8217;s just another way to upload an OVF into your catalog. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekafterfive.wordpress.com/582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekafterfive.wordpress.com/582/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekafterfive.wordpress.com/582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekafterfive.wordpress.com/582/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekafterfive.wordpress.com/582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekafterfive.wordpress.com/582/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekafterfive.wordpress.com/582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekafterfive.wordpress.com/582/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekafterfive.wordpress.com/582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekafterfive.wordpress.com/582/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekafterfive.wordpress.com/582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekafterfive.wordpress.com/582/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekafterfive.wordpress.com/582/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekafterfive.wordpress.com/582/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=582&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekafterfive.com/2012/05/03/import-an-ovf-from-your-desktop-to-a-vcloud-org-catalog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320ac6648e4ca57065e35ff8a6411296?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">Jake</media:title>
		</media:content>
	</item>
		<item>
		<title>Deepdive: vCloud vApp Networks</title>
		<link>http://geekafterfive.com/2012/04/24/deepdive-vcloud-vapp-networks/</link>
		<comments>http://geekafterfive.com/2012/04/24/deepdive-vcloud-vapp-networks/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 20:53:35 +0000</pubDate>
		<dc:creator>Jake</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[vCloud]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[isolated networks]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[NatRouted]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[Static Routing]]></category>
		<category><![CDATA[vApp]]></category>
		<category><![CDATA[vCloud API]]></category>
		<category><![CDATA[vCloud Director]]></category>
		<category><![CDATA[vcloud vapp]]></category>

		<guid isPermaLink="false">http://geekafterfive.com/?p=450</guid>
		<description><![CDATA[There are three network &#8220;fence modes&#8221; (connection modes)  in vCloud Director: Isolated, Bridged, and Nat Routed. These apply to both Org and vApp networks, but for now we are talking in the context of vApps. We&#8217;ll also talk about the vApp network features, courtesy of vShield Edge: DHCP, Firewall, Static Routing, and NAT. A quick [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=450&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are three network &#8220;fence modes&#8221; (connection modes)  in vCloud Director: <strong>Isolated, Bridged, </strong>and<strong> Nat Routed</strong>. These apply to both Org and vApp networks, but for now we are talking in the context of vApps. We&#8217;ll also talk about the vApp network features, courtesy of vShield Edge: <strong>DHCP, Firewall, Static Routing,</strong> and <strong>NAT.</strong></p>
<p>A quick note about terminology. The use of terms like &#8220;fence mode&#8221; are what you will see in the API. When applicable, I will refer to the Web UI term (in parenthesis) or with a screenshot.</p>
<h3><span style="color:#3366ff;">Isolated</span></h3>
<div id="attachment_525" class="wp-caption alignnone" style="width: 353px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0077.png"><img class=" wp-image-525  " style="border-image:initial;border-width:1px;border-color:gray;border-style:solid;" title="Isolation network" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0077.png?w=343&h=169" alt="" width="343" height="169" /></a><p class="wp-caption-text">An Isolation vApp Network</p></div>
<div id="attachment_532" class="wp-caption alignnone" style="width: 456px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0085.png"><img class=" wp-image-532   " style="border-image:initial;border-width:1px;border-color:gray;border-style:solid;" title="Isolation network details" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0085.png?w=446&h=49" alt="" width="446" height="49" /></a><p class="wp-caption-text">Isolation network details</p></div>
<p><strong>Definition:</strong> Isolated networks are completely separate networks. By themselves, there is no connection or communication to other networks. Because they are completely isolated, you can do normally frowned upon things like reuse the same subnet over and over in different isolated networks. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>Usage:</strong> Isolated networks are great for back-end communication, such as database traffic. In a web application, for instance, you could give your web servers a second interface on the isolated network that database server resides on. Another use for an isolation network is not isolation at all, but providing your own routing device. Your routing appliance could have one interface on the isolated vApp network, and then another interface on an Org level network. If you wanted features such as dynamic routing, VPN to a specific vApp, Web Application Firewall, etc,  this would be the way to go.</p>
<p><strong>Features:</strong> Because of their isolation, the only available vShield Edge feature is DHCP. Theoretically speaking, if DHCP were enabled and a vShield was instantiated, static routing should be available, but it&#8217;s not. Firewall and NAT are not available because they both require connections to another network via vShield Edge.</p>
<h3><span style="color:#3366ff;">Bridged</span></h3>
<div id="attachment_526" class="wp-caption alignnone" style="width: 402px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0079.png"><img class=" wp-image-526   " style="border-image:initial;border-width:1px;border-color:gray;border-style:solid;" title="Bridged" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0079.png?w=392&h=310" alt="" width="392" height="310" /></a><p class="wp-caption-text">a Bridged vApp Network</p></div>
<div id="attachment_531" class="wp-caption alignnone" style="width: 456px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0084.png"><img class=" wp-image-531  " style="border-image:initial;border-width:1px;border-color:gray;border-style:solid;" title="SNAG-0084" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0084.png?w=446&h=50" alt="" width="446" height="50" /></a><p class="wp-caption-text">Bridged network Details</p></div>
<p><strong>Definition:</strong> Bridged simply means you are directly connected to an Org network. In fact, the vCloud Web UI calls the connection &#8220;Direct&#8221; and shows up as the Org Network you are directly connected to.</p>
<p><strong>Usage:</strong> Bridged (direct connected) networks are commonly used for VMs that need to be accessed from anywhere within your Organization, such as DNS or directory services.</p>
<p><strong>Features: </strong>None (at the vApp level). The Org level of this network may have feautures available, depending on it&#8217;s type.</p>
<h3><span style="color:#3366ff;">NatRouted</span></h3>
<div id="attachment_527" class="wp-caption alignnone" style="width: 402px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0080.png"><img class=" wp-image-527  " style="border-image:initial;border-width:1px;border-color:gray;border-style:solid;" title="natRouted" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0080.png?w=392&h=293" alt="" width="392" height="293" /></a><p class="wp-caption-text">A natRouted vApp Network</p></div>
<div id="attachment_530" class="wp-caption alignnone" style="width: 456px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0083.png"><img class=" wp-image-530   " style="border-image:initial;border-width:1px;border-color:gray;border-style:solid;" title="natrouted network details" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0083.png?w=446&h=46" alt="" width="446" height="46" /></a><p class="wp-caption-text">NatRouted network details</p></div>
<p><strong>Definition:</strong> Connecting a vApp network to an Org network results in a &#8216;natRouted&#8217; mode. This automatically invokes the creation of a vShield Edge appliance to connect the two different networks. The appliance has an internal and an external interface. The internal interfaces is on the vApp network, and the external on the org network.</p>
<p><strong>Usage:</strong> NatRouted networks are required for firewall, NAT, and static routing services provided by vShield Edge. Typical usage includes securely publishing applications to the organization or Internet, but there is also the concept of &#8220;fencing,&#8221; Fencing a network essentially hides a VM&#8217;s MAC and IP addresses from the rest of your Virtual Datacenter. As long as each VM has a NAT address to the Org network, you can have duplicate IP addresses internally in the vApp because it is &#8220;hidden&#8221; by the vShield Edge device. This won&#8217;t work if you are using static routing.</p>
<p><strong>Features: </strong>All of &#8216;em! DHCP, Firewall, NAT, Static Routing</p>
<h3><span style="color:#3366ff;">More on fenced mode&#8230;</span></h3>
<div id="attachment_528" class="wp-caption alignnone" style="width: 387px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0081.png"><img class=" wp-image-528 " style="border-image:initial;border-width:1px;border-color:gray;border-style:solid;" title="fenced mode" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0081.png?w=377&h=402" alt="" width="377" height="402" /></a><p class="wp-caption-text">A fenced vApp</p></div>
<div id="attachment_529" class="wp-caption alignnone" style="width: 456px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0082.png"><img class=" wp-image-529  " style="border-image:initial;border-width:1px;border-color:gray;border-style:solid;" title="fenced network details" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0082.png?w=446&h=48" alt="" width="446" height="48" /></a><p class="wp-caption-text">Fenced vApp Network Details</p></div>
<div id="attachment_533" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0087.png"><img class="size-full wp-image-533  " style="border-image:initial;border-width:1px;border-color:gray;border-style:solid;" title="fence vApp Checkbox" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0087.png?w=490&h=198" alt="" width="490" height="198" /></a><p class="wp-caption-text">Fence vApp Checkbox</p></div>
<p>There is a checkbox in the UI to &#8220;Fence vApp.&#8221; This option takes a &#8216;bridged&#8217; network, and turns it into &#8216;natRouted.&#8217; It will show the network as &#8220;Fenced&#8221; in the UI. The VMs within this vApp still have Org Network IPs, but a vShield device is placed in between the VMs and the Org network. So essentially, you have duplicate subnets on the internal and external sides of the vShield Edge device. As a network guy, this gives me heartburn. Here&#8217;s a screenshot to demonstrate a potential problem using the &#8220;fence vApp&#8221; option:</p>
<div id="attachment_541" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0089.png"><img class="size-full wp-image-541   " style="border-image:initial;border-width:1px;border-color:gray;border-style:solid;" title="fence woops" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0089.png?w=490&h=459" alt="" width="490" height="459" /></a><p class="wp-caption-text">Anyone else see an issue here? I'll give you a hint: 102</p></div>
<p>Basically the &#8220;test (fenced)&#8221; VM will never be able to communicate with &#8220;test&#8221; with the same IP address of 192.168.1.102. The reverse is not true because you will be communicating to the external &#8220;test (fenced)&#8221; address of 192.168.1.105.</p>
<p>My opinion? If you want to mask IP and MAC addresses, just use a natRouted type. No need to complexify when there is a perfect solution available.</p>
<h3><span style="color:#3366ff;">Managing your vApp networks with PowerCLI</span></h3>
<p>Bust out your <a href="http://www.vmware.com/support/vcd/doc/rest-api-doc-1.5-html/index.html" target="_blank">vCloud API Schema Reference</a>, because we&#8217;re going to be playing with the <a href="http://www.vmware.com/support/vcd/doc/rest-api-doc-1.5-html/types/NetworkConfigSectionType.html" target="_blank">NetworkConfigSection</a> of the vApp!</p>
<p>To get you going, you&#8217;ll want to retrieve the NetworkConfigSection of the vApp, which can be done like so:</p>
<p><pre class="brush: powershell; wrap-lines: false;">
$networkConfigSection = (Get-CIVapp MyVApp).extensiondata.GetNetworkConfigSection()
</pre></p>
<p>Now we can start to explore. Using the schema as our guide, we can drill down to actual config.</p>
<p><pre class="brush: powershell; wrap-lines: false;">
$networkConfigSection.NetworkConfig[0].configuration
</pre></p>
<p>Note the index at the end of NetworkConfig. Even if you only have 1 network in your vApp, you still have to specify an index of the collection or pipe to a where-object {$_.networkname -eq &#8220;NetworkName&#8221;}</p>
<p><em>FenceMode</em> specifies the vApp network type, which can be one of: <strong>isolated, bridged, natRouted</strong></p>
<p><em>ParentNetwork</em> specifies the Org network that the vApp network is connected to. This doesn&#8217;t apply to isolated networks, can you guess why? <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><em>Features</em> contains the DHCP, Firewall, NAT, and Static Routing configuration</p>
<p><em>IPScope</em> contains the gateway, subnet, DNS, and IP Pool.</p>
<p>Pretty much all of this is modifiable (refer to the schema reference). Simply assign a new value to something and then run:</p>
<p><pre class="brush: powershell; wrap-lines: false;">
$networkConfigSection.updateServerData()
</pre></p>
<p>Let&#8217;s create some new networks:</p>
<h4><span style="color:#3366ff;">Isolated</span></h4>
<p><pre class="brush: powershell; wrap-lines: false;">
$mynetwork = new-object vmware.vimautomation.cloud.views.vappnetworkconfiguration
$mynetwork.networkName = &quot;MyIsolatedNetwork&quot;

$mynetwork.configuration = new-object vmware.vimautomation.cloud.views.networkconfiguration
$mynetwork.configuration.fencemode = &quot;isolated&quot;

$mynetwork.Configuration.IpScope = new-object vmware.vimautomation.cloud.views.ipscope
$mynetwork.Configuration.IpScope.gateway = &quot;192.168.3.1&quot;
$mynetwork.Configuration.IpScope.Netmask = &quot;255.255.255.0&quot;
$mynetwork.Configuration.IpScope.Dns1 = &quot;8.8.8.8&quot;

$mynetwork.Configuration.IpScope.ipranges = new-object vmware.vimautomation.cloud.views.ipranges
$mynetwork.Configuration.IpScope.IpRanges.IpRange = new-object vmware.vimautomation.cloud.views.iprange
$mynetwork.Configuration.IpScope.IpRanges.IpRange[0].startaddress = &quot;192.168.3.100&quot;
$mynetwork.Configuration.IpScope.IpRanges.IpRange[0].endaddress = &quot;192.168.3.200&quot;

$networkConfigSection = $vapp.ExtensionData.GetNetworkConfigSection()
$networkConfigSection.networkconfig += $mynetwork
$networkConfigSection.updateserverdata()
</pre></p>
<h4><span style="color:#3366ff;">Bridged</span></h4>
<p><pre class="brush: powershell; wrap-lines: false;">
$orgNetworkName = &quot;MyOrgNetwork&quot;
$orgNetwork = (Get-Org).extensiondata.networks.network | where {$_.name -eq $orgNetworkName}

$mynetwork = new-object vmware.vimautomation.cloud.views.vappnetworkconfiguration
$mynetwork.NetworkName = $orgNetworkName

$mynetwork.configuration = new-object vmware.vimautomation.cloud.views.networkconfiguration
$mynetwork.configuration.fencemode = &quot;bridged&quot;

$mynetwork.Configuration.ParentNetwork = New-Object vmware.vimautomation.cloud.views.reference
$mynetwork.Configuration.ParentNetwork.Href = $orgNetwork.href

$networkConfigSection = $vapp.ExtensionData.GetNetworkConfigSection()
$networkConfigSection.networkconfig += $mynetwork
$networkConfigSection.updateserverdata()

</pre></p>
<h4><span style="color:#3366ff;">natRouted</span></h4>
<p><pre class="brush: powershell; wrap-lines: false;">
$orgNetworkName = &quot;MyOrgNetwork&quot;
$orgNetwork = (Get-Org).extensiondata.networks.network | where {$_.name -eq $orgNetworkName}

$mynetwork = new-object vmware.vimautomation.cloud.views.vappnetworkconfiguration
$mynetwork.networkName = &quot;MyNatRoutedNetwork&quot;

$mynetwork.configuration = new-object vmware.vimautomation.cloud.views.networkconfiguration
$mynetwork.configuration.fencemode = &quot;natRouted&quot;

$mynetwork.Configuration.ParentNetwork = New-Object vmware.vimautomation.cloud.views.reference
$mynetwork.Configuration.ParentNetwork.Href = $orgNetwork.href

$mynetwork.Configuration.IpScope = new-object vmware.vimautomation.cloud.views.ipscope
$mynetwork.Configuration.IpScope.gateway = &quot;192.168.3.1&quot;
$mynetwork.Configuration.IpScope.Netmask = &quot;255.255.255.0&quot;
$mynetwork.Configuration.IpScope.Dns1 = &quot;8.8.8.8&quot;

$mynetwork.Configuration.IpScope.ipranges = new-object vmware.vimautomation.cloud.views.ipranges
$mynetwork.Configuration.IpScope.IpRanges.IpRange = new-object vmware.vimautomation.cloud.views.iprange
$mynetwork.Configuration.IpScope.IpRanges.IpRange[0].startaddress = &quot;192.168.3.100&quot;
$mynetwork.Configuration.IpScope.IpRanges.IpRange[0].endaddress = &quot;192.168.3.200&quot;

# With no firewall
$mynetwork.Configuration.features += new-object vmware.vimautomation.cloud.views.firewallservice
$mynetwork.Configuration.features[0].isenabled = $false

$networkConfigSection = $vapp.ExtensionData.GetNetworkConfigSection()
$networkConfigSection.networkconfig += $mynetwork
$networkConfigSection.updateserverdata()
</pre></p>
<p>Note on the above, I explicitly told it to create the natRouted network without a firewall. By default, it will enable the firewall, but we&#8217;ll talk about in the services section.</p>
<h4><span style="color:#3366ff;">Removing Networks </span></h4>
<p>(Extra handy if you want to remove an Org network reference from a vApp!)</p>
<p><pre class="brush: powershell; wrap-lines: false;">
$removeNetworkName = &quot;MyNetwork&quot;
$networkConfigSection = $vapp.ExtensionData.GetNetworkConfigSection()
$networkConfigSection.networkconfig = $networkConfigSection.networkconfig | where {$_.networkname -ne $removeNetworkName}
$networkConfigSection.updateserverdata()
</pre></p>
<h4><span style="color:#3366ff;">Services</span></h4>
<p>You&#8217;ll find the services in the features collection here:</p>
<p><pre class="brush: powershell; wrap-lines: false;">

$networkConfigSection.networkConfig[0].configuration.features

</pre></p>
<p>Here&#8217;s what the natRouted network features look like in Powershell. I did a gettype() afterwards to show you the object types for each service.</p>
<div id="attachment_560" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0091.png"><img class="size-full wp-image-560 " style="border-image:initial;border-width:1px;border-color:gray;border-style:solid;" title="SNAG-0091" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0091.png?w=490&h=225" alt="" width="490" height="225" /></a><p class="wp-caption-text">natRouted network features</p></div>
<p>The <a href="http://www.vmware.com/support/vcd/doc/rest-api-doc-1.5-html/types/FirewallServiceType.html" target="_blank">Firewall Service</a></p>
<p>This is really handy if you have a spreadsheet full of rules, or want to add an entire range of IPs (which The vCloud Director UI and API do not support that at this time.) As stated above, the firewall service is added by default in a new natRouted network. By default it&#8217;s set to deny all inbound.</p>
<p><pre class="brush: powershell; wrap-lines: false;">

$fwService = New-Object vmware.vimautomation.cloud.views.firewallservice
$fwService.DefaultAction = &quot;drop&quot;
$fwService.LogDefaultAction = $false
$fwService.IsEnabled = $true

#Add two rules
$fwService.FirewallRule = New-Object vmware.vimautomation.cloud.views.firewallrule
$fwService.FirewallRule += New-Object vmware.vimautomation.cloud.views.firewallrule

#First Rule
$fwService.FirewallRule[0].isenabled = $true
$fwService.FirewallRule[0].description = &quot;Web In&quot;

$fwService.FirewallRule[0].protocols = New-Object vmware.vimautomation.cloud.views.firewallRuleTypeProtocols
$fwService.FirewallRule[0].protocols.tcp = $true

$fwService.FirewallRule[0].policy = &quot;allow&quot;
$fwService.FirewallRule[0].port = &quot;80&quot;
$fwService.FirewallRule[0].destinationIp = &quot;192.168.2.10&quot;
$fwService.FirewallRule[0].sourceport = &quot;-1&quot;
$fwService.FirewallRule[0].sourceip = &quot;Any&quot;
$fwService.FirewallRule[0].direction = &quot;in&quot;

#Second Rule
$fwService.FirewallRule[1].isenabled = $true
$fwService.FirewallRule[1].description = &quot;SSH In&quot;

$fwService.FirewallRule[1].protocols = New-Object vmware.vimautomation.cloud.views.firewallRuleTypeProtocols
$fwService.FirewallRule[1].protocols.tcp = $true

$fwService.FirewallRule[1].policy = &quot;allow&quot;
$fwService.FirewallRule[1].port = &quot;22&quot;
$fwService.FirewallRule[1].destinationIp = &quot;192.168.2.10&quot;
$fwService.FirewallRule[1].sourceport = &quot;-1&quot;
$fwService.FirewallRule[1].sourceip = &quot;Any&quot;
$fwService.FirewallRule[1].direction = &quot;in&quot;

</pre></p>
<p>If you are adding the firewall service to a new network, just paste the above code into the creation code. If you are adding to an existing network, you&#8217;ll need some additional code. Warning, this currently deletes the old ruleset. This was meant to add firewall service where there was none before:</p>
<p><pre class="brush: powershell; wrap-lines: false;">

$vappName = &quot;My vApp&quot;
$vappNetworkName = &quot;My vApp Network&quot;
$networkConfigSection = (Get-CIVApp $vappName).extensiondata.GetNetworkConfigSection()
$vAppNetwork = $networkConfigSection.NetworkConfig | where {$_.networkName -eq $vappNetworkName}
$vAppNetwork.Configuration.Features = $vAppNetwork.Configuration.Features | where {!($_ -is [vmware.vimautomation.cloud.views.firewallservice])}

# Remove the NAT service if there is nothing in there (auto mapped), otherwise the update will error out. :(
if (!($vAppNetwork.Configuration.Features | where {$_ -is [vmware.vimautomation.cloud.views.natservice]}).natrule[0].description)
{
 $vAppNetwork.Configuration.Features = $vAppNetwork.Configuration.Features | where {!($_ -is [vmware.vimautomation.cloud.views.natservice])}
}

# Add our new ruleset
$vAppNetwork.Configuration.Features += $fwService
$networkConfigSection.UpdateServerData()

</pre></p>
<p>The <a href="http://www.vmware.com/support/vcd/doc/rest-api-doc-1.5-html/types/DhcpServiceType.html" target="_blank">DHCP Service</a></p>
<p><pre class="brush: powershell; wrap-lines: false;">

$dhcpService = New-Object vmware.vimautomation.cloud.views.dhcpservice
$dhcpService.DefaultLeaseTime = &quot;3600&quot;
$dhcpService.MaxLeaseTime = &quot;7200&quot;
$dhcpService.IsEnabled = $true

$dhcpService.IpRange = New-Object vmware.vimautomation.cloud.views.iprange
$dhcpService.IpRange.StartAddress = &quot;192.168.2.2&quot;
$dhcpService.IpRange.EndAddress = &quot;192.168.2.50&quot;

</pre></p>
<p>Like the firewall service, DHCP is automatically added to a new a new network, but is set to disabled. If you want to use this code to add DHCP to an existing network, you&#8217;ll just need to modify the existing service, or remove the old service and add this one. You will also need to omit the NAT service section when updating an existing network or you&#8217;ll encounter an error.</p>
<p>The <a href="http://www.vmware.com/support/vcd/doc/rest-api-doc-1.5-html/types/NatServiceType.html" target="_blank">Nat Service</a></p>
<p>If the NAT service box is checked (and it is by default), then the NatService will already be enabled and the NatService object will be there.</p>
<p>The <em>NatType</em> allows you to pick: ipTranslation and portForwarding. You must choose one or the other. <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>There is also a <em>policy</em>, which lets you choose what traffic will NAT (all, or inbound only): allowTraffic, or allowTrafficIn</p>
<p>Unfortunately, the NAT service is not yet fully implemented in the .NET SDK/PowerCLI, so you&#8217;ll have to go straight REST API on this one&#8230;</p>
<p>Before we do, it&#8217;s important to know the different NAT rule types:</p>
<p><em>OneToOneBasicRule</em>: This simply maps an internal IP to an External IP. This is what I typically think of as a Static, or 1:1 NAT.</p>
<p><em>OneToOneVmRule</em>: This maps a specific VM Nic to an external address. This is helpful if you change your internal IP and don&#8217;t want to fiddle with NAT rules at the same time.</p>
<p><em>PortForwardingRule</em>: Also a simple mapping rule to map a port on the external IP to an internal IP address.</p>
<p><em>VmRule</em>: Odd naming, but it&#8217;s port forwarding to the VM Nic, rather than an IP address.</p>
<p>Ok, so let&#8217;s take a peek at our NAT rules using Powershell with the help of System.Net.Webclient:</p>
<p><pre class="brush: powershell; wrap-lines: false;">&lt;/pre&gt;
$vApp = Get-CIVApp &quot;vapp network testing&quot;
$vAppNetworkName = &quot;natRouted&quot;

$netConf = $vapp.ExtensionData.GetNetworkConfigSection()
$netConfUri = $netconf.Href
$netConfType = $netconf.Type

$webclient = New-Object system.net.webclient
$webclient.Headers.Add(&quot;x-vcloud-authorization&quot;,$netconf.Client.SessionKey)
$webclient.Headers.Add(&quot;accept&quot;,$netConfType)
[xml]$netConfXML = $webclient.DownloadString($netConfUri)
&lt;pre&gt;

</pre></p>
<p>Basically, we just downloaded the XML representation of the NetworkConfigSection, bypassing the .NET SDK and communicating directly to the vCloud API. REST APIs ROCK.</p>
<p>We can now drill down to our Nat Rules:</p>
<p><pre class="brush: powershell; wrap-lines: false;">

($netConfXML.NetworkConfigSection.NetworkConfig | where {$_.networkname -eq $vAppNetworkName}).configuration.features.natservice.natrule

</pre></p>
<p>This will return something like:</p>
<div id="attachment_569" class="wp-caption alignnone" style="width: 98px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0093.png"><img class="size-full wp-image-569" title="SNAG-0093" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0093.png?w=490" alt=""   /></a><p class="wp-caption-text">Port Forwarding Rules</p></div>
<p>You&#8217;ll need to drill down one level further to view the rules. I am going to use a foreach to show all of them:</p>
<p><pre class="brush: powershell; wrap-lines: false;">

($netConfXML.NetworkConfigSection.NetworkConfig | where {$_.networkname -eq $vAppNetworkName}).configuration.features.natservice.natrule | foreach{$_.vmrule}

</pre></p>
<p>&#8230;and you&#8217;ll end up with something like this:</p>
<div id="attachment_570" class="wp-caption alignnone" style="width: 449px"><a href="http://geekafterfive.files.wordpress.com/2012/04/snag-0094.png"><img class="size-full wp-image-570" title="SNAG-0094" src="http://geekafterfive.files.wordpress.com/2012/04/snag-0094.png?w=490" alt=""   /></a><p class="wp-caption-text">Port forwarding rule details</p></div>
<p>So, now we can GET our NAT rules, how to we SET them? We have to get a bit more complicated and use [System.Net.Webrequest]. This is an example of creating a new NAT rule for port translation. OneToOne rules will be a bit different, so again, this is purely for example. If you need something specific and can&#8217;t figure it out, I&#8217;d be glad to help.</p>
<p><pre class="brush: powershell; wrap-lines: false;">

$NatPort = &quot;53&quot;
$natRule = ($netConfXML.NetworkConfigSection.Networkconfig | where {$_.networkname -eq $vAppNetworkName}).configuration.features.natservice.natrule[0].clonenode(1)
$natRule.VmRule.ExternalPort = $NatPort
$natRule.VmRule.InternalPort = $NatPort
($netConfXML.NetworkConfigSection.Networkconfig | where {$_.networkname -eq $vAppNetworkName}).configuration.features.natservice.appendChild($NatRule)

$request = [System.Net.WebRequest]::Create($netConfUri);
$request.Headers.Add(&quot;x-vCloud-authorization&quot;,$netconf.Client.SessionKey)
$request.Accept=&quot;application/vnd.vmware.vcloud.task+xml&quot;
$request.Method=&quot;PUT&quot;
$request.ContentType = $netConfType

$postData = $netConfXML.outerxml
#adding strings to xml puts in silly newlines.
$xmlString = $postData.replace(&quot;&#xA;&quot;,&quot;&quot;)
[byte[]]$xmlEnc = [System.Text.Encoding]::UTF8.GetBytes($xmlString)
$request.ContentLength = $xmlEnc.length
[System.IO.Stream]$requestStream = $request.GetRequestStream()
$requestStream.write($xmlEnc, 0, $xmlEnc.Length)
$requestStream.Close()
$response = $request.GetResponse()
$responseStream = $response.getResponseStream()
$streamReader = new-object System.IO.StreamReader($responseStream)
$result = $streamReader.ReadtoEnd()
$streamReader.close()
$response.close()

</pre></p>
<p>&nbsp;</p>
<p>The <a href="http://www.vmware.com/support/vcd/doc/rest-api-doc-1.5-html/types/StaticRoutingServiceType.html" target="_blank">StaticRouting Service</a></p>
<p>The Static Routing service controls routing within the vShield Edge.</p>
<p><pre class="brush: powershell; wrap-lines: false;">

$routeService = New-Object vmware.vimautomation.cloud.views.staticroutingservice
$routeService.IsEnabled = $true

$routeService.StaticRoute = New-Object vmware.vimautomation.cloud.views.staticroute
$routeService.StaticRoute[0].name = &quot;test&quot;
$routeService.StaticRoute[0].network = &quot;192.168.1.0/24&quot;
$routeService.StaticRoute[0].nexthopip = &quot;192.168.2.1&quot;
$routeService.StaticRoute[0].interface = &quot;External&quot;

</pre></p>
<p>Again, if you are adding this to an existing network, you&#8217;ll need to omit the Nat Service, or you will encounter an error.</p>
<p>&nbsp;</p>
<h3><span style="color:#3366ff;">Wrap up&#8230;</span></h3>
<p>WHEW, that&#8217;s all I have for now. I like answering questions, so please post in the comments or get me on twitter.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekafterfive.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekafterfive.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekafterfive.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekafterfive.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekafterfive.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekafterfive.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekafterfive.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekafterfive.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekafterfive.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekafterfive.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekafterfive.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekafterfive.wordpress.com/450/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekafterfive.wordpress.com/450/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekafterfive.wordpress.com/450/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=450&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekafterfive.com/2012/04/24/deepdive-vcloud-vapp-networks/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320ac6648e4ca57065e35ff8a6411296?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">Jake</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0077.png" medium="image">
			<media:title type="html">Isolation network</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0085.png" medium="image">
			<media:title type="html">Isolation network details</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0079.png" medium="image">
			<media:title type="html">Bridged</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0084.png" medium="image">
			<media:title type="html">SNAG-0084</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0080.png" medium="image">
			<media:title type="html">natRouted</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0083.png" medium="image">
			<media:title type="html">natrouted network details</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0081.png" medium="image">
			<media:title type="html">fenced mode</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0082.png" medium="image">
			<media:title type="html">fenced network details</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0087.png" medium="image">
			<media:title type="html">fence vApp Checkbox</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0089.png" medium="image">
			<media:title type="html">fence woops</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0091.png" medium="image">
			<media:title type="html">SNAG-0091</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0093.png" medium="image">
			<media:title type="html">SNAG-0093</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/04/snag-0094.png" medium="image">
			<media:title type="html">SNAG-0094</media:title>
		</media:content>
	</item>
		<item>
		<title>How to be a PowerCLI Ninja</title>
		<link>http://geekafterfive.com/2012/03/13/how-to-be-a-powercli-ninja/</link>
		<comments>http://geekafterfive.com/2012/03/13/how-to-be-a-powercli-ninja/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 17:31:47 +0000</pubDate>
		<dc:creator>Jake</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Bluelock]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Learning Ruby]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Windows Powershell]]></category>

		<guid isPermaLink="false">http://geekafterfive.com/?p=453</guid>
		<description><![CDATA[Dean (aka @Danger0u5) mentioned on twitter that he&#8217;d like to be a Powershell/PowerCLI ninja someday. (I think he&#8217;s already on his way. ) It got me thinking about how I got started with Powershell and what my core success factors were with learning it. These tips can apply to learning almost anything, really! 1. Make it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=453&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;"><a href="http://geekafterfive.files.wordpress.com/2012/03/ryu.png"><img class="size-full wp-image-492 aligncenter" title="ryu" src="http://geekafterfive.files.wordpress.com/2012/03/ryu.png?w=490" alt=""   /></a>Dean (aka <a href="https://twitter.com/#!/Danger0u5" target="_blank">@Danger0u5</a>) mentioned on twitter that he&#8217;d like to be a Powershell/PowerCLI ninja someday. (I think he&#8217;s already on his way. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) It got me thinking about how I got started with Powershell and what my core success factors were with learning it. These tips can apply to learning almost anything, really!</p>
<h3>1. Make it a priority.</h3>
<p>My mentor and <a href="https://twitter.com/#!/odayp" target="_blank">Bluelock CTO Pat O&#8217;Day</a> (maybe unbeknownst to him <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ), caught me once saying &#8220;I wish I had the time&#8230;&#8221; Very understanding to my dilemma, he said &#8220;You will <em>never</em> have enough time. It&#8217;s about priority.&#8221; That simple fact might be obvious to a lot of people, but it absolutely changed my views about time vs. priority. &#8220;I don&#8217;t have time&#8221; doesn&#8217;t exist for me anymore. It&#8217;s all about where it lands in the list. &#8220;Hey Jake, can you {Insert task here}?&#8221; &#8220;I can do that, but lets figure out the priority.&#8221;</p>
<p>The point here? You have to decide the priority of learning this new skill. Ask yourself &#8220;How important to me is learning Powershell/PowerCLI?&#8221; I can tell you from experience it is <em>well worth it</em>, but you need to decide for yourself. After that, it will be fairly simple to fit it into your list.</p>
<h3>2. Focus on a specific task.</h3>
<p>I learned Powershell because I had an idea. A need. I wanted learn to Powershell to accomplish something very specific. So, I mapped out in my head the various bits of information that I would need, and then learned how to get that information with Powershell. Then it was just math and formatting. There are a lot of great books, blogs and online training regarding Powershell/PowerCLI, but if you don&#8217;t have a specific need, you aren&#8217;t going to retain the information.</p>
<p>I&#8217;ve been struggling learning Ruby (and Rails). I <em>really</em> want to learn Ruby (and Rails). The problem is, I don&#8217;t have a specific need. I&#8217;ve been through <a href="http://tryruby.org" target="_blank">tryruby.org</a> and <a href="http://railsforzombies.org/" target="_blank">Rails for Zombies</a>, which are both GREAT free tools to learn Ruby (and Rails), but the moment I leave the page, it&#8217;s gone. There are a few reasons I want to learn Ruby, but again, nothing that is specific enough, or high enough priority.</p>
<p>For those struggling to learn Powershell/PowerCLI, don&#8217;t be discouraged. Focus on a very specific need. For those struggling to find a specific need, talk to people around your office. Groans and sighs are good places to start. Listen for phrases like &#8220;It&#8217;s going to take me 12 hours to put this data in.&#8221; Another good place to look for inspiration is the forums. Look for tumbleweed type questions (those that have somehow slipped the view of <a href="http://www.lucd.info/" target="_blank">Luc Dekens</a>. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) I&#8217;ll lurk the forums once in a while looking for things I find interesting. Even if they are already answered, I can look at how the problem was solved, and see if I would have answered it the same way.</p>
<h3>3. Don&#8217;t be afraid to ask for help, but know how to ask good questions.</h3>
<p>It surprises me how often I answer my own questions just by typing it up, and reading it as if I were answering for someone else. When I ask a question, I really try to understand what information someone would need to answer it. I want to equip the answerer with enough information to get me the right answer the first time. There can be <em>too little</em> information, but worse there can be <em>too much</em> information. Understanding the real issue is the key to getting a correct answer.</p>
<p>Back in my telecom days, there was a tag always attached to a piece of equipment that, in large bold font said &#8220;DO NOT ASSUME ANYTHING.&#8221; I always had a chuckle about it, but it&#8217;s a life rule Engineers should live by. Don&#8217;t assume thing A doesn&#8217;t work because of thing B. Be ready to defend it with facts. When it comes to asking questions, don&#8217;t assume that DNS is working properly, or that network cable is attached and it&#8217;s not a crossover, or everything is powered on, or&#8230;&#8230;&#8230;&#8230;.. you get the point. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h3>4. Share what you know.</h3>
<p>The question my mentor asked that I responded with &#8220;I just haven&#8217;t had the time&#8221; was about my involvement with the local tech community. My other excuse was &#8220;I don&#8217;t really get anything out of it.&#8221; That, of course, was also a poor response. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  He went on to tell the story of the birth of Bluelock. Actually, the story of how the founders of Bluelock first met. Not surprisingly, it was a small technology group.</p>
<p>He recommended that I make it a priority (see tip 1), but also start sharing what I know. I countered with the fact that there are EXPERTS out there who know way more than I do, and what could I possibly have to offer the community. He pointed out that everyone is a sum of their own unique experiences. No two people live exactly the same life. Whether you consider yourself an expert or not, you bring a uniqueness no one else has. Don&#8217;t be afraid to share it. You could turn out to be an expert in someone else&#8217;s eyes.</p>
<p>So if you&#8217;ve been on the fence about learning PowerCLI (Powershell), Ruby, or anything else, think about these principles and how they apply to you!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekafterfive.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekafterfive.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekafterfive.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekafterfive.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekafterfive.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekafterfive.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekafterfive.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekafterfive.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekafterfive.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekafterfive.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekafterfive.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekafterfive.wordpress.com/453/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekafterfive.wordpress.com/453/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekafterfive.wordpress.com/453/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=453&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekafterfive.com/2012/03/13/how-to-be-a-powercli-ninja/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320ac6648e4ca57065e35ff8a6411296?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">Jake</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/03/ryu.png" medium="image">
			<media:title type="html">ryu</media:title>
		</media:content>
	</item>
		<item>
		<title>vCloud PowerCLI SvMotion</title>
		<link>http://geekafterfive.com/2012/03/06/vcloud-powercli-svmotion/</link>
		<comments>http://geekafterfive.com/2012/03/06/vcloud-powercli-svmotion/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 18:40:53 +0000</pubDate>
		<dc:creator>Jake</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[vCloud]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[datastore]]></category>
		<category><![CDATA[relocate]]></category>
		<category><![CDATA[svmotion]]></category>
		<category><![CDATA[VMware VMFS]]></category>

		<guid isPermaLink="false">http://geekafterfive.com/?p=445</guid>
		<description><![CDATA[What&#8217;s the correct capitalization supposed to be? sVmotion? SVMotion? SvMotion? Blah, whatever. The point is, William Lam wrote a couple killer posts on doing a storage vMotion through the vCloud API. Feeling the PowerCLI mafia needed a solution as well, I went ahead and wrote it. William&#8217;s post about performing the vMotion with the REST [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=445&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>What&#8217;s the correct capitalization supposed to be? sVmotion? SVMotion? SvMotion? Blah, whatever. The point is, <a href="https://twitter.com/#!/lamw" target="_blank">William Lam</a> wrote a couple <a href="http://www.virtuallyghetto.com/2012/02/performing-storage-vmotion-in-vcloud.html" target="_blank">killer</a> <a href="http://www.virtuallyghetto.com/2012/02/performing-storage-vmotion-in-vcloud_19.html" target="_blank">posts</a> on doing a storage vMotion through the vCloud API. Feeling the PowerCLI mafia needed a solution as well, I went ahead and wrote it. William&#8217;s post about performing the vMotion with the REST API made writing the PowerCLI code very easy.</p>
<p>A few general things to note:</p>
<ol>
<li>This is a storage vMotion for the entire VM. If you have VMs with multiple disks on different datastores, the theoretical behavior is that it will move all disks to the same datastore.</li>
<li>You have to be a user with SYSTEM access. Normal Org admins don&#8217;t have to worry about such things as datastores. It&#8217;s all abstracted. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </li>
<li>You can&#8217;t SvMotion to vCloud-disabled datastores. (I could think of some interesting use cases for that, but it doesn&#8217;t work. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</li>
<li>This is a great method to empty datastores for doing fresh VMFS volumes. Jason Boche has a great VMFS 5 <a href="http://www.boche.net/blog/index.php/2011/07/21/vmfs-5-vmfs-3-whats-the-deal/" target="_blank">article here</a>. Don&#8217;t forget to disable the datastore in vCloud Director before running! <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </li>
</ol>
<p><pre class="brush: powershell; wrap-lines: false;">

$vmName = &quot;MyVMName&quot;
$destDatastoreName = &quot;MyDatastoreName&quot;

$vmQuery = Search-Cloud -QueryType AdminVM -Name $vmName

if ($destDatastoreName -eq $vmQuery.datastoreName)
{
 Write-Host -ForegroundColor Red &quot;Silly Wabbit, You are trying to sVmotion to the same Datastore.&quot;
 break
}
else
{
 $vm = Get-CIVM $vmName
 $dsQuery = Search-Cloud -QueryType Datastore -Name $destDatastoreName
 $dsRef = New-Object vmware.vimautomation.cloud.views.reference
 $dsRef.Href = &quot;https://$($global:DefaultCIServers[0].name)/api/admin/extension/datastore/$($dsquery.id.split(':')[-1])&quot;
 $vm.ExtensionData.Relocate($dsRef)
}

</pre></p>
<p><strong>Lines 4-11:</strong> This is basically some validation to make sure we are not trying to migrate to the same datastore.<br />
<strong>Line 14:</strong> Get information on the datastore we are migrating to.<br />
<strong>Line 15:</strong> Create a reference object.<br />
<strong>Line 16:</strong> Search-Cloud only returns an ID, so we have to construct the href ourselves. (Has to do with the query type Seach-Cloud is using. No biggie.)<br />
<strong>Line 17:</strong> Relocate!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekafterfive.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekafterfive.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekafterfive.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekafterfive.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekafterfive.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekafterfive.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekafterfive.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekafterfive.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekafterfive.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekafterfive.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekafterfive.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekafterfive.wordpress.com/445/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekafterfive.wordpress.com/445/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekafterfive.wordpress.com/445/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=445&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekafterfive.com/2012/03/06/vcloud-powercli-svmotion/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320ac6648e4ca57065e35ff8a6411296?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">Jake</media:title>
		</media:content>
	</item>
		<item>
		<title>Upload Media to vCloud with PowerCLI</title>
		<link>http://geekafterfive.com/2012/02/24/upload-media-to-vcloud-with-powercli/</link>
		<comments>http://geekafterfive.com/2012/02/24/upload-media-to-vcloud-with-powercli/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 22:03:15 +0000</pubDate>
		<dc:creator>Jake</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[vCloud]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[vCloud API]]></category>
		<category><![CDATA[vcloud media]]></category>

		<guid isPermaLink="false">http://geekafterfive.com/?p=416</guid>
		<description><![CDATA[&#160; It&#8217;s a double post Friday! This one won&#8217;t be quite as long. &#160; Have a bunch of ISOs you need to upload to your vCloud Director Catalog? This is the script for you! Once in a while I get a crazy &#8220;can you do this&#8221; from my friend and Bluelock product development dude, Ben [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=416&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://commons.wikipedia.org/wiki/File:Small_cdisk_ubt.jpeg" target="_blank"><img class="zemanta-img-inserted zemanta-img-configured alignright" title="English: a small compact disk / Memorex CD-RW ..." src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/18/Small_cdisk_ubt.jpeg/300px-Small_cdisk_ubt.jpeg" alt="English: a small compact disk / Memorex CD-RW ..." width="210" height="189" /></a></p>
<p>&nbsp;</p>
<p>It&#8217;s a double post Friday! This one won&#8217;t be quite as long. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>&nbsp;</p>
<p>Have a bunch of ISOs you need to upload to your vCloud Director Catalog? This is the script for you! Once in a while I get a crazy &#8220;can you do this&#8221; from my friend and <a href="http://blog.bluelock.com/" target="_blank">Bluelock</a> product development dude, Ben Miller. The detailed reasons why are still very top secret, but I can at least share the code to upload media and add it to the catalog!!!</p>
<p>Enjoy!</p>
<p>-Jake</p>
<p>&nbsp;</p>
<p><pre class="brush: powershell;">

$isoFolder = &quot;C:\MyISOs&quot;
$vdcName = &quot;MyVDC&quot;
$catalogName = &quot;MyCatalog&quot;

# create / delete a cloud media object
Get-ChildItem $isoFolder | %{

$media = New-Object VMware.VimAutomation.Cloud.Views.Media
$media.name = $_.name
$media.ImageType = 'iso'
$media.size = $_.length

$media.Files = New-Object VMware.VimAutomation.Cloud.Views.FilesList
$media.Files.File = @(new-object VMware.VimAutomation.Cloud.Views.File)
$media.Files.File[0] = new-object VMware.VimAutomation.Cloud.Views.File
$media.Files.file[0].type = 'iso'
$media.Files.file[0].name = $_.name

$vdc = Get-OrgVdc $vdcName
$vdc.ExtensionData.CreateMedia($media)

$filehref = (Get-Media $media.name | Get-CIView).files.file[0].link[0].href
$webclient = New-Object system.net.webclient
$webclient.Headers.Add('x-vcloud-authorization',$global:DefaultCIServers[0].sessionid)
$webclient.Uploadfile($filehref, 'PUT', $_.fullname)
}

#Add non-catalog media to catalog
$mediaList = get-media | where {!$_.catalog}
$catalog = get-catalog $catalogName

foreach ($noCatMedia in $mediaList)
{
 $resEntity = $vdc.extensiondata.resourceEntities.resourceEntity | where {$_.name -eq $noCatMedia.name}
 $catitem = New-Object VMware.VimAutomation.Cloud.Views.CatalogItem
 $catitem.Entity = $resEntity.href
 $catitem.name = $resEntity.name
 $catitem.description = $media.description
 $catalog.extensiondata.createcatalogitem($catitem)
}

</pre></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekafterfive.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekafterfive.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekafterfive.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekafterfive.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekafterfive.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekafterfive.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekafterfive.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekafterfive.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekafterfive.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekafterfive.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekafterfive.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekafterfive.wordpress.com/416/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekafterfive.wordpress.com/416/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekafterfive.wordpress.com/416/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=416&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekafterfive.com/2012/02/24/upload-media-to-vcloud-with-powercli/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320ac6648e4ca57065e35ff8a6411296?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">Jake</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/commons/thumb/1/18/Small_cdisk_ubt.jpeg/300px-Small_cdisk_ubt.jpeg" medium="image">
			<media:title type="html">English: a small compact disk / Memorex CD-RW ...</media:title>
		</media:content>
	</item>
		<item>
		<title>vCloud API/GUI Throwdown: Part 2</title>
		<link>http://geekafterfive.com/2012/02/24/vcloud-apigui-throwdown-part-2/</link>
		<comments>http://geekafterfive.com/2012/02/24/vcloud-apigui-throwdown-part-2/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 14:00:11 +0000</pubDate>
		<dc:creator>Jake</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[vCloud]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[Cloning]]></category>
		<category><![CDATA[Hot Clone]]></category>
		<category><![CDATA[vApp]]></category>
		<category><![CDATA[vCloud API]]></category>
		<category><![CDATA[Virtual machine]]></category>

		<guid isPermaLink="false">http://geekafterfive.com/?p=370</guid>
		<description><![CDATA[In the first part of  vCloud API/GUI Throwdown, we watched in awe as the API completely pummeled the GUI. I gave you some hints in part 1 to do this on your own with the API, but this time around we&#8217;re going to use PowerCLI 5.0.1 and the new vCloud Snap-in! Requirements: vCloud Director 1.5 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=370&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://geekafterfive.files.wordpress.com/2012/02/punchout1.png"><img class=" wp-image-373 alignleft" title="punchout1" src="http://geekafterfive.files.wordpress.com/2012/02/punchout1.png?w=282&h=246" alt="" width="282" height="246" /></a></p>
<p>In the first part of  <a title="vCloud API/GUI Throwdown!" href="http://geekafterfive.com/2011/11/01/vcloud-apigui-throwdown/">vCloud API/GUI Throwdown</a>, we watched in awe as the API completely pummeled the GUI. I gave you some hints in part 1 to do this on your own with the API, but this time around we&#8217;re going to use PowerCLI 5.0.1 and the new vCloud Snap-in!</p>
<p><span style="color:#ff0000;">Requirements:</span></p>
<ul>
<li><span style="color:#ff0000;">vCloud Director 1.5 (Hit me up in the blog comments if you need Powershell code for 1.0.x)</span></li>
<li><span style="color:#ff0000;">PowerCLI 5.0.1</span></li>
</ul>
<h3>Hot Cloning vApps</h3>
<p>This will make an <strong>EXACT</strong> copy of the vApp, MAC addresses and all. If you don&#8217;t want that, you&#8217;ll need to make some modifications. Hit the comments for specific requests.</p>
<p><pre class="brush: powershell; wrap-lines: false;">

Add-PSSnapin vmware.vimautomation.cloud
Connect-CIServer vcloud.example.com -org MyOrg -User MyUser -Password MyPassword

$sourceName = &quot;SourceVApp&quot;
$cloneName = &quot;NewVAppName&quot;
$vdcName = &quot;MyOrgVdcName&quot;

$sourceVapp = Get-CIVApp $sourceName
$vdc = Get-OrgVdc $vdcName
$cloneParams = new-object VMware.VimAutomation.Cloud.Views.CloneVAppParams
$instParams = new-object VMware.VimAutomation.Cloud.Views.InstantiationParams

$instParams.section = $sourceVapp.ExtensionData.Section[0,1,3]
$cloneParams.InstantiationParams = $instParams
$cloneParams.Source = $sourceVapp.Href
$cloneParams.Name = $cloneName

$vdc.ExtensionData.CloneVApp($cloneParams)

</pre></p>
<p><strong>Lines 1-2:</strong> Add Snap-in and connect.<br />
<strong>Lines 4-6:</strong> Source, Destination, and vDC names.<br />
<strong>Lines 8-9:</strong> Get vApp and vDC objects<br />
<strong>Line 10:</strong> Create a CloneVAppParams Object. This is all the info vCloud needs to clone the vApp.<br />
<strong>Line 11:</strong> Create a InstantiationParams Object. This is a container object for the OVF data.<br />
<strong>Line 13:</strong> Add OVF Data to InstantiationParams Object. Notice I picked specific sections of the OVF [0,1,3]. Section 2 is NetworkConnectionSection. We just need Section 3: NetworkConfigSection. Attempting to clone Section 2 will cause it to fail. I&#8217;ll deep dive later. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  <span style="color:#ff6600;">EDIT: If you are not utilizing vApp Networks, you should only copy sections [0,1]. I will follow up with another blog post dedicated to cloning and customizing vApps.</span><br />
<strong>Line 14-16:</strong> Put our InstantiationParams and other info into our CloneVAppParams object.<br />
<strong>Line 18:</strong> Clone!</p>
<p>The below image was my source vApp&#8230;.</p>
<div id="attachment_405" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/02/snag-0022.png"><img class="size-full wp-image-405 " title="SNAG-0022" src="http://geekafterfive.files.wordpress.com/2012/02/snag-0022.png?w=490&h=211" alt="" width="490" height="211" /></a><p class="wp-caption-text">My source vApp.</p></div>
<div id="attachment_406" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/02/snag-0023.png"><img class="size-full wp-image-406" title="SNAG-0023" src="http://geekafterfive.files.wordpress.com/2012/02/snag-0023.png?w=490&h=147" alt="" width="490" height="147" /></a><p class="wp-caption-text">cloneVApp method return.</p></div>
<div id="attachment_407" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/02/snag-0024.png"><img class="size-full wp-image-407" title="SNAG-0024" src="http://geekafterfive.files.wordpress.com/2012/02/snag-0024.png?w=490&h=244" alt="" width="490" height="244" /></a><p class="wp-caption-text">Dolly, My cloned Sheep! Er, um... vApp!</p></div>
<h3></h3>
<h3>Hot Modify connected VM network</h3>
<p>This will change the network, and assigned IP in vCloud Director if you are using a Static IP Pool address. This does NOT change the guest address. You&#8217;ll have to change it manually in the OS or force re-customization.</p>
<p><pre class="brush: powershell; wrap-lines: false;">

$newNetworkName = &quot;MyNewNetwork&quot;

$vm = Get-CIVM MyCIVM

($vm.ExtensionData.Section | where {$_ -is [VMware.VimAutomation.Cloud.Views.NetworkConnectionSection]}).NetworkConnection[0].network = $newNetworkName
($vm.ExtensionData.Section | where {$_ -is [VMware.VimAutomation.Cloud.Views.NetworkConnectionSection]}).updateServerData()

</pre></p>
<p><strong>Line 1:</strong> The name of the network you want your VM connected to.<br />
<strong>Line 3:</strong> Get the VM.<br />
<strong>Line 5:</strong>  This is a long line. It basically says Get the Network Connection OVF section and assign the first NIC to the new network.<br />
<strong>Line 7:</strong> UpdateServerData() This sends the updated changes to vCloud Director. Cool, eh?</p>
<div id="attachment_399" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/02/snag-0029.png"><img class="size-full wp-image-399" title="SNAG-0029" src="http://geekafterfive.files.wordpress.com/2012/02/snag-0029.png?w=490&h=149" alt="" width="490" height="149" /></a><p class="wp-caption-text">Before...Connected to vAppNetwork2 with an IP on the .2 subnet.</p></div>
<div id="attachment_400" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/02/snag-0030.png"><img class="size-full wp-image-400" title="SNAG-0030" src="http://geekafterfive.files.wordpress.com/2012/02/snag-0030.png?w=490&h=146" alt="" width="490" height="146" /></a><p class="wp-caption-text">After...vAppNetwork3, and an IP on the .3 subnet!</p></div>
<p><span style="color:#008000;">(Jake tip: You can use UpdateViewData() to refresh the VM with any data that may have changed. No need to re-&#8217;Get&#8217; the VM!)</span></p>
<h3>Hot Modify Disk Size</h3>
<p>This one is also a bit ugly. I&#8217;ll try to clean it up later, but it works. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Also, I shouldn&#8217;t need to tell you that <span style="color:#ff0000;"><strong>THIS IS DANGEROUS</strong></span>. For giggles, I tried to set it to a lower size. The command threw an exception, but vCloud still displays it at the lower size. I&#8217;ll update after I check if vSphere actually allowed this (I&#8217;d be surprised). If not, it&#8217;ll be a bug report to VMware. Either way, make sure you are GROWING the disk. Mind the zeros.</p>
<p><pre class="brush: powershell; wrap-lines: false;">

$vm = Get-CIVM MyCIVM
$newsize = “10240”

(($vm.ExtensionData.Section | where {$_ -is [VMware.VimAutomation.Cloud.Views.OvfVirtualHardwareSection]}).item | where {$_.ResourceType.value -eq 17})[0].hostresource[0].AnyAttr[0].&quot;#text&quot; = $newsize
($vm.ExtensionData.Section | where {$_ -is [VMware.VimAutomation.Cloud.Views.OvfVirtualHardwareSection]}).updateserverdata()

</pre></p>
<p><strong>Line 1:</strong> Get the VM<br />
<strong>Line 2:</strong> New size in bytes.<br />
<strong>Line 4:</strong> In plain English&#8230;Get the disks from the OVF hardware section, set the <strong>first</strong> disk&#8217;s new size to the new value.<br />
<strong>Line 5:</strong> Update server data.</p>
<div id="attachment_402" class="wp-caption alignnone" style="width: 500px"><a href="http://geekafterfive.files.wordpress.com/2012/02/snag-0031.png"><img class="size-full wp-image-402" title="SNAG-0031" src="http://geekafterfive.files.wordpress.com/2012/02/snag-0031.png?w=490&h=374" alt="" width="490" height="374" /></a><p class="wp-caption-text">All greyed out, and it's even powered off. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p></div>
<div id="attachment_401" class="wp-caption alignnone" style="width: 482px"><a href="http://geekafterfive.files.wordpress.com/2012/02/snag-0028.png"><img class="size-full wp-image-401" title="SNAG-0028" src="http://geekafterfive.files.wordpress.com/2012/02/snag-0028.png?w=490" alt=""   /></a><p class="wp-caption-text">Newly expanded drive!!! YES!</p></div>
<h3>Bonus! Hot Modify Org Name!</h3>
<p>The fine chaps over at <a href="http://www.vcoteam.info" target="_blank">vcoteam.info</a> mentioned adding the ability to <a href="http://www.vcoteam.info/learn-vco/code-snippets-change-the-name-of-a-vcloud-director-organization.html" target="_blank">hot change an Org name</a> to the list, which you can&#8217;t do in the GUI. Watch this. <strong>Three lines of code</strong>&#8230;Ready? You&#8217;ll need to be a system admin for this one.</p>
<p><pre class="brush: powershell; wrap-lines: false;">

$org = Get-Org OrgName
$org.ExtensionData.name = &quot;NewName&quot;
$org.ExtensionData.UpdateServerData()

</pre></p>
<p><strong>Line 1:</strong> That<br />
<strong>Line 2:</strong> was<br />
<strong>Line 3:</strong> easy.</p>
<p>Of course, if you want the display name changed, you&#8217;ll have to modify <span style="color:#3366ff;">$org.ExtensionData.FullName</span> as well <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div id="attachment_403" class="wp-caption alignnone" style="width: 362px"><a href="http://geekafterfive.files.wordpress.com/2012/02/snag-0025.png"><img class="size-full wp-image-403" title="SNAG-0025" src="http://geekafterfive.files.wordpress.com/2012/02/snag-0025.png?w=490" alt=""   /></a><p class="wp-caption-text">Old and busted....</p></div>
<div id="attachment_404" class="wp-caption alignnone" style="width: 370px"><a href="http://geekafterfive.files.wordpress.com/2012/02/snag-0026.png"><img class="size-full wp-image-404" title="SNAG-0026" src="http://geekafterfive.files.wordpress.com/2012/02/snag-0026.png?w=490" alt=""   /></a><p class="wp-caption-text">New Hotness...</p></div>
<p>Have a specific vCloud API request? <strong>Let&#8217;s hear it in the comments!</strong></p>
<p>Cheers!</p>
<p>-Jake</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekafterfive.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekafterfive.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekafterfive.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekafterfive.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekafterfive.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekafterfive.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekafterfive.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekafterfive.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekafterfive.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekafterfive.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekafterfive.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekafterfive.wordpress.com/370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekafterfive.wordpress.com/370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekafterfive.wordpress.com/370/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=370&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekafterfive.com/2012/02/24/vcloud-apigui-throwdown-part-2/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320ac6648e4ca57065e35ff8a6411296?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">Jake</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/punchout1.png" medium="image">
			<media:title type="html">punchout1</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/snag-0022.png" medium="image">
			<media:title type="html">SNAG-0022</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/snag-0023.png" medium="image">
			<media:title type="html">SNAG-0023</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/snag-0024.png" medium="image">
			<media:title type="html">SNAG-0024</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/snag-0029.png" medium="image">
			<media:title type="html">SNAG-0029</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/snag-0030.png" medium="image">
			<media:title type="html">SNAG-0030</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/snag-0031.png" medium="image">
			<media:title type="html">SNAG-0031</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/snag-0028.png" medium="image">
			<media:title type="html">SNAG-0028</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/snag-0025.png" medium="image">
			<media:title type="html">SNAG-0025</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/snag-0026.png" medium="image">
			<media:title type="html">SNAG-0026</media:title>
		</media:content>
	</item>
		<item>
		<title>vCheck6 Utility Commands</title>
		<link>http://geekafterfive.com/2012/02/08/vcheck6-utility-commands/</link>
		<comments>http://geekafterfive.com/2012/02/08/vcheck6-utility-commands/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 21:25:16 +0000</pubDate>
		<dc:creator>Jake</dc:creator>
				<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[alan renouf]]></category>
		<category><![CDATA[vcheck]]></category>

		<guid isPermaLink="false">http://geekafterfive.com/?p=354</guid>
		<description><![CDATA[A quick video on the plugin utility commands found in vCheck 6! For more info, be sure to visit the vCheck 6 release page, and visit the vCheck Plugins page to browse the available plugins. Don&#8217;t forget to thank Alan for all of his hard work on vCheck! &#160; If you are not the video [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=354&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A quick video on the plugin utility commands found in vCheck 6! For more info, be sure to visit the <a href="http://www.virtu-al.net/2012/02/08/vcheck-6-0-released/" target="_blank">vCheck 6 release page</a>, and visit the <a href="http://www.virtu-al.net/featured-scripts/vcheck/vcheck-plugins/" target="_blank">vCheck Plugins page</a> to browse the available plugins. Don&#8217;t forget to <a href="https://twitter.com/#!/alanrenouf" target="_blank">thank Alan</a> for all of his hard work on vCheck!</p>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='490' height='306' src='http://www.youtube.com/embed/S_xKCVXAq2E?version=3&amp;rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent' frameborder='0'></iframe></span></p>
<p>&nbsp;</p>
<p>If you are not the video watching type, here are some helpful tips:</p>
<p><strong>1. In order to access the vCheck Utility Commands. You must &#8216;dot-source&#8217; the file:</strong></p>
<p><pre class="brush: powershell;">. .\vCheckUtils.ps1</pre></p>
<p>That&#8217;s dot[space]dot, for those reading this on a mobile device. <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>2. The list of commands will display. The basic functionality is as follows:</strong></p>
<p><pre class="brush: powershell;">

Get-vCheckCommand # Get commands found in vCheckUtils.ps1
Get-vCheckPlugin # Retrieve list of plugins
Add-vCheckPlugin # Add plugin from Virtu-Al.net
Remove-vCheckPlugin  # Remove an installed plugin
</pre></p>
<p><strong>3. Some common uses:</strong></p>
<p>List Plugins not installed(available from Virtu-al.net repository):</p>
<p><pre class="brush: powershell;">Get-VCheckPlugin -notinstalled</pre></p>
<p>Get a plugin by name:</p>
<p><pre class="brush: powershell;">Get-VCheckPlugin -name &quot;Plugin Name&quot;</pre></p>
<p>Get a plugin by name and install it from the Virtu-Al.net repository:</p>
<p><pre class="brush: powershell;">Get-VCheckPlugin -name &quot;Plugin Name | Add-VCheckPlugin</pre></p>
<p>Get a plugin by name and UNINSTALL it:</p>
<p><pre class="brush: powershell;">Get-VCheckPlugin -name &quot;Plugin Name | Add-VCheckPlugin</pre></p>
<p>Get all plugins that are NOT installed, and install them (warning, lots of plugins!):</p>
<p><pre class="brush: powershell;">Get-VCheckPlugin -notinstalled | Add-VCheckPlugin</pre></p>
<p>Need more help?</p>
<p><pre class="brush: powershell;">Get-Help Get-VCheckPlugin</pre></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekafterfive.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekafterfive.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekafterfive.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekafterfive.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekafterfive.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekafterfive.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekafterfive.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekafterfive.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekafterfive.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekafterfive.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekafterfive.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekafterfive.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekafterfive.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekafterfive.wordpress.com/354/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=354&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekafterfive.com/2012/02/08/vcheck6-utility-commands/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320ac6648e4ca57065e35ff8a6411296?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">Jake</media:title>
		</media:content>
	</item>
		<item>
		<title>Poll: Bluelock booth giveaways…</title>
		<link>http://geekafterfive.com/2012/02/06/poll-bluelock-booth-giveaways/</link>
		<comments>http://geekafterfive.com/2012/02/06/poll-bluelock-booth-giveaways/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 22:16:34 +0000</pubDate>
		<dc:creator>Jake</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bluelock]]></category>
		<category><![CDATA[vmworld]]></category>

		<guid isPermaLink="false">http://geekafterfive.com/?p=341</guid>
		<description><![CDATA[The following poll is simply for fun, and my curiosity. It has no scientific value or promise of said booth giveaway. I&#8217;m not even in the marketing dept.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=341&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The following poll is simply for fun, and my curiosity. It has no scientific value or promise of said booth giveaway. I&#8217;m not even in the marketing dept. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p style="text-align:center;"><a href="http://geekafterfive.files.wordpress.com/2012/02/snag-0040.png"><img class="aligncenter size-full wp-image-343" style="border-color:black;border-style:solid;border-width:1px;" title="SNAG-0040" src="http://geekafterfive.files.wordpress.com/2012/02/snag-0040.png?w=490&h=169" alt="" width="490" height="169" /></a></p>
<p style="text-align:center;"><a href="http://geekafterfive.files.wordpress.com/2012/02/snag-0047.png"><img class="aligncenter size-full wp-image-342" style="border-color:black;border-style:solid;border-width:1px;" title="SNAG-0047" src="http://geekafterfive.files.wordpress.com/2012/02/snag-0047.png?w=490&h=58" alt="" width="490" height="58" /></a></p>
<p style="text-align:center;"><a name="pd_a_5916776"></a><div class="PDS_Poll" id="PDI_container5916776" style="display:inline-block;"></div><div id="PD_superContainer"></div><noscript><a href="http://polldaddy.com/poll/5916776">Take Our Poll</a></noscript></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekafterfive.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekafterfive.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekafterfive.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekafterfive.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekafterfive.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekafterfive.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekafterfive.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekafterfive.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekafterfive.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekafterfive.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekafterfive.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekafterfive.wordpress.com/341/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekafterfive.wordpress.com/341/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekafterfive.wordpress.com/341/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekafterfive.com&#038;blog=18937350&#038;post=341&#038;subd=geekafterfive&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekafterfive.com/2012/02/06/poll-bluelock-booth-giveaways/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/320ac6648e4ca57065e35ff8a6411296?s=96&amp;d=identicon&amp;r=G" medium="image">
			<media:title type="html">Jake</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/snag-0040.png" medium="image">
			<media:title type="html">SNAG-0040</media:title>
		</media:content>

		<media:content url="http://geekafterfive.files.wordpress.com/2012/02/snag-0047.png" medium="image">
			<media:title type="html">SNAG-0047</media:title>
		</media:content>
	</item>
	</channel>
</rss>

