<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Professional VMware &#187; VMware Powershell</title> <atom:link href="http://professionalvmware.com/category/vmware-powershell/feed/" rel="self" type="application/rss+xml" /><link>http://professionalvmware.com</link> <description>How Many Turtles Can You Fit On A Rock?</description> <lastBuildDate>Fri, 10 Feb 2012 00:37:53 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.2.1</generator> <item><title>Four PowerCLI One-Liners That Saved The World!</title><link>http://professionalvmware.com/2009/09/four-powercli-one-liners-that-saved-the-world/</link> <comments>http://professionalvmware.com/2009/09/four-powercli-one-liners-that-saved-the-world/#comments</comments> <pubDate>Mon, 14 Sep 2009 14:30:00 +0000</pubDate> <dc:creator>bunchc</dc:creator> <category><![CDATA[powershell]]></category> <category><![CDATA[VMware]]></category> <category><![CDATA[VMware Powershell]]></category> <category><![CDATA[one-liner]]></category> <category><![CDATA[PowerCLI]]></category> <guid
isPermaLink="false">http://professionalvmware.com/2009/09/four-powercli-one-liners-that-saved-the-world/</guid> <description><![CDATA[Ok, So maybe they didn’t save the world, but the sure saved my weekend. Rather than spend a lot of time on the intro, let’s dive right in. These will be in Problem/PowerShell/Output format. The Problem: More spaghetti environments, this time we need to count some resources. The first counts CPU, the second Memory. Yes [...]]]></description> <content:encoded><![CDATA[<p></p><p>Ok, So maybe they didn’t save the world, but the sure saved my weekend. Rather than spend a lot of time on the intro, let’s dive right in. These will be in Problem/PowerShell/Output format.</p><h5>The Problem:</h5><p>More spaghetti environments, this time we need to count some resources. The first counts CPU, the second Memory. Yes there are pretty reports for this, but when you need the answer, you need it now.</p><h5>The PowerShell:</h5><p>get-datacenter &quot;SomeDC&quot; | get-cluster &quot;clustername&quot; |get-vm | select numcpu | %{ $cpus += $_.numcpu } <br
/>get-datacenter &quot;SomeDC&quot; | get-vm | select memorymb | %{ $memorymb += $_.memorymb }</p><h5>The Output:</h5><p>$cpus <br
/>60</p><p>$memorymb <br
/>401388</p><h5>The Problem:</h5><p>Need to rapidly identify what Datastore is associated with a VM or VMs. This is helpful to get a handle on the spaghetti that an poorly maintained environment can become over time.</p><h5>The PowerShell:</h5><p>get-datacenter | get-vm | %{ $_.Name; ($_ | get-datastore | select Name).Name }</p><h5>The Output:</h5><p>VM1.professionalvmware.com <br
/>VM Storage</p><h5>The Problem:</h5><p>Need to rapidly identify what the condition is in. Because perusing the entire VI for one server, and then clicking “Configuration &gt; Server Health” is too much work.</p><h5>The PowerShell:</h5><p>get-vmhost -name &quot;servername&quot; | get-view | %{$_.Runtime.HealthSystemRuntime}&#160; | %{ $_.HardwareStatusInfo.StorageStatusInfo } | where { $_.Name -like &quot;Battery*&quot; } | %{ $_.Status}</p><h5>The Output:</h5><p>Key&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : Green <br
/>Label&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : Green <br
/>Summary&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : Physical element is functioning as expected <br
/>DynamicType&#160;&#160;&#160;&#160; : <br
/>DynamicProperty :</p><h5>The Problem:</h5><p>Cold migrating A LOT of VMs. Note: This could be changed in a few ways that would allow much cooler things, but this is what I needed at the time and how I got there.</p><h5>The PowerShell:</h5><p>import-csv c:\maint.csv | %{ get-vm -name $_.ServerName -Location (get-datacenter &quot;SomeDatacenter&quot;) | move-vm -Datastore (get-datastore -name &quot;SomeDataStore&quot;) -RunAsync -Confirm:$false }</p><h5>Example CSV:</h5><p>ServerName <br
/>vm1.professionalvmware.com <br
/>vm5.professionalvmware.com <br
/>vm6.professionalvmware.com <br
/>vm7.professionalvmware.com</p><h5>The Output:</h5><p>Id&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : <br
/>IsCancelable&#160;&#160;&#160; : False <br
/>IsComplete&#160;&#160;&#160;&#160;&#160; : False <br
/>Result&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : <br
/>Name&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : RelocateVM_Task <br
/>Description&#160;&#160;&#160;&#160; : Relocate Virtual Machine storage <br
/>State&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; : Running <br
/>PercentComplete : 0 <br
/>StartTime&#160;&#160;&#160;&#160;&#160;&#160; : 9/12/2009 7:14:17 PM <br
/>FinishTime&#160;&#160;&#160;&#160;&#160; : <br
/>ObjectId&#160;&#160;&#160;&#160;&#160;&#160;&#160; :</p> ]]></content:encoded> <wfw:commentRss>http://professionalvmware.com/2009/09/four-powercli-one-liners-that-saved-the-world/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>VMworld Day 1 Wrap Up</title><link>http://professionalvmware.com/2009/09/vmworld-day-1-wrap-up/</link> <comments>http://professionalvmware.com/2009/09/vmworld-day-1-wrap-up/#comments</comments> <pubDate>Wed, 02 Sep 2009 06:45:00 +0000</pubDate> <dc:creator>bunchc</dc:creator> <category><![CDATA[VMware]]></category> <category><![CDATA[VMware Powershell]]></category> <category><![CDATA[VMworld]]></category> <guid
isPermaLink="false">http://professionalvmware.com/2009/09/01/vmworld-day-1-wrap-up/</guid> <description><![CDATA[I was going to try live blogging some of this, however that is not quite my style if you will. So I will try to summarize in a few posts where I went and what I did. So without further adieu: Lab 1 – Scripting Virtual Infrastructure with PowerShell &#38;&#160; Perl All and all a [...]]]></description> <content:encoded><![CDATA[<p></p><p>I was going to try live blogging some of this, however that is not quite my style if you will. So I will try to summarize in a few posts where I went and what I did. So without further adieu:</p><h5>Lab 1 – Scripting Virtual Infrastructure with PowerShell &amp;&#160; Perl</h5><p>All and all a good lab. A brief into to PowerShell and then a hands on dive into the PowerCLI. Despite others complaints about the labs, my only complaint was the speed. At times we were watching character refreshes on the screen. It was fun working with the folks next to me, and helping to further evangelize PowerCLI. At some point, it was as if the room had a “light bulb” moment. The instructor was not bad either.</p><p><a
href="http://vmware.com/go/PowerShell">http://vmware.com/go/PowerShell</a></p><p>Tech Exchange Session – vCloud API</p><p>It was at this point in the day that I found out how awesome the &#8216;”Press” tag on the badge was. Tech Exchange is being handled as a separate component of VMworld, kinda like partner day. Only much much more awesome. But, it is also a “for pay” add on to your VMworld ticket. Long story short, the Press pass let me wander in anyways. Even if I had not been able to wander in, I would have visited the registration booth and upgraded. The content was THAT good.</p><p>Moving along to the session itself, in the first 5 minutes, the speaker had introduced himself. “What do I do? I am an engineer. I write the code.” From there, he covered some basics of the vCloud API, and then dove right into some code examples. The best like from the session was “The restful api for vcloud, is like the DMV, fill out a form, get a VM” (at least twas similar to this).</p><p><a
title="http://communities.vmware.com/community/developer/forums/vcloudapi" href="http://communities.vmware.com/community/developer/forums/vcloudapi">http://communities.vmware.com/community/developer/forums/vcloudapi</a></p><h5>Tech Exchange Session – The Virtualization EcoShell</h5><p>This one started slowly, as I’m not sure many folks knew this was even here. After tweeting about it a few times however we managed to get a crowd going. The speaker was ok once he got going, and the demo was worth the wait (it was given towards the end). What other product can you point at your vCenter and tell it to give you a Visio… for Free!</p><p><a
title="http://thevesi.org/" href="http://thevesi.org/">http://thevesi.org/</a></p><h5>VMware Fun Run 5k</h5><p>This one was also well worth it. I didn’t manage to register in time, but got there via stand by bus. About 200 runners participated to benefit the “Save the Bay” charity. Having Never seen the bridge in person, this was amazing. Clear sky’s a good breeze, this was an excellent time.</p><p><a
title="http://www.yellow-bricks.com/2009/09/01/vmworld-golden-gate-bridge-run-2009-thanks-everyone/" href="http://www.yellow-bricks.com/2009/09/01/vmworld-golden-gate-bridge-run-2009-thanks-everyone/">http://www.yellow-bricks.com/2009/09/01/vmworld-golden-gate-bridge-run-2009-thanks-everyone/</a></p><h5>VMware Communities Tweetup</h5><p>Besides the bridge run, this was likely the one of the coolest things about being here. It also seems that folks know the beard. Or at least seemed to. I don’t fancy they were reading the small print on the name badge anyways. Got to meet lots of other great folks and to thank John Troyer for making this happen (both the tweetup and my coming to VMworld).</p><p>All and all an AWESOME first day. Today looks to be just as good.</p> ]]></content:encoded> <wfw:commentRss>http://professionalvmware.com/2009/09/vmworld-day-1-wrap-up/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Now Where Did I Put My VMotion?</title><link>http://professionalvmware.com/2009/02/now-where-did-i-put-my-vmotion/</link> <comments>http://professionalvmware.com/2009/02/now-where-did-i-put-my-vmotion/#comments</comments> <pubDate>Tue, 03 Feb 2009 04:09:44 +0000</pubDate> <dc:creator>bunchc</dc:creator> <category><![CDATA[powershell]]></category> <category><![CDATA[Scripting]]></category> <category><![CDATA[VMotion]]></category> <category><![CDATA[VMware]]></category> <category><![CDATA[VMware Powershell]]></category> <guid
isPermaLink="false">http://professionalvmware.com/2009/02/02/now-where-did-i-put-my-vmotion/</guid> <description><![CDATA[Let’s say you have a metric heck ton of hosts, and you need to check them… all. To see if VMotion has been enabled properly. How do you do it? Well, you could hire that out of work banker now out in front of the grocery store to come and click through all of the [...]]]></description> <content:encoded><![CDATA[<p></p><p>Let’s say you have a metric heck ton of hosts, and you need to check them… all. To see if VMotion has been enabled properly. How do you do it?</p><p>Well, you could hire that out of work banker now out in front of the grocery store to come and click through all of the hosts in your VI environment. Or… You could look it up with PowerShell. So without further adieu:</p><p><span
style="font-family: Courier New; color: #b1a396;">&gt; get-vmhost | get-vmhostnetwork | select-object -expandProperty VirtualNic | Select VmotionEnabled </span></p><p><span
style="font-family: Courier New; color: #b1a396;">VMotionEnabled<br
/> &#8212;&#8212;&#8212;&#8212;&#8211;<br
/> True</span></p><p>Well, my “lab” has only a single host. Against 100, you would see either True or False 100 times, which while it is the information you’re looking for, really isn’t all that useful without the host names in it, now is it?</p><p>Lets do this instead:</p><p><span
style="font-family: Courier New; color: #b1a396;">&gt; get-vmhost | .Get-VMotion.ps1 </span></p><p><span
style="font-family: Courier New; color: #b1a396;">name            vmotion<br
/> &#8212;-            &#8212;&#8212;-<br
/> 192.168.15.253  True</span></p><p>Well… spiffy, no? What’s in this magical <a
href="http://professionalvmware.com/scripts/Get-vMotion.ps1">Get-VMotion.ps1</a>? Well first, clicking it’s name back there should lead you to a download of sorts. If that’s not to your fancy, then here is some copy/paste magic for you:</p><p><span
style="font-family: Courier New; color: #b1a396;">Process {<br
/> if ( $_ -isnot [VMware.VimAutomation.Client20.VMHostImpl] ) {<br
/> Write-Error &#8220;VMHost expected, skipping object in pipeline.&#8221;<br
/> continue<br
/> }<br
/> $PropertyCol = @( &#8220;name&#8221;, &#8220;vmotion&#8221; )<br
/> $vmh = &#8220;&#8221; | Select-Object -Property $PropertyCol<br
/> $vmh.name = $_.Name<br
/> $vmh.vmotion = $_ | Get-VMHostNetwork | select-object -expandProperty VirtualNic | %{$_.VmotionEnabled}<br
/> $vmh<br
/> }</span></p><p>All except the ugly formatting of course <img
src='http://professionalvmware.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> That is purely my own. Enjoy in good health, and if you have any questions, leave them in the comments, or hit me up on Twitter @cody_bunch . Peace &#8230; through VMotion.</p> ]]></content:encoded> <wfw:commentRss>http://professionalvmware.com/2009/02/now-where-did-i-put-my-vmotion/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Log Bundles, of the Virtual Center Variety</title><link>http://professionalvmware.com/2009/01/log-bundles-of-the-virtual-center-variety/</link> <comments>http://professionalvmware.com/2009/01/log-bundles-of-the-virtual-center-variety/#comments</comments> <pubDate>Tue, 27 Jan 2009 17:46:00 +0000</pubDate> <dc:creator>bunchc</dc:creator> <category><![CDATA[Troubleshooting]]></category> <category><![CDATA[VI Toolkit]]></category> <category><![CDATA[Virtual Infrastructure]]></category> <category><![CDATA[VMware]]></category> <category><![CDATA[VMware Powershell]]></category> <category><![CDATA[powershell]]></category> <guid
isPermaLink="false">http://professionalvmware.com/2009/01/26/log-bundles-of-the-virtual-center-variety/</guid> <description><![CDATA[Things break. They always do. Chaos is inevitable. So how do you get insight into some of the chaos that was occurring in your Virtual Center when disaster strikes? Turns out, the VI Client makes this quite easy. After you get your Virtual Center service running again, connect using the VI Client. Once connected… well [...]]]></description> <content:encoded><![CDATA[<p></p><p>Things break. They always do. Chaos is inevitable. So how do you get insight into some of the chaos that was occurring in your Virtual Center when disaster strikes? Turns out, the VI Client makes this quite easy.</p><p>After you get your Virtual Center service running again, connect using the VI Client. Once connected… well follow along:</p><p>File &gt; Export &gt; Export Diag Data<br
/> <a
href="http://professionalvmware.com/wp-content/uploads/2009/01/20090125-1901.png"><img
style="display: inline; border: 0px;" title="2009-01-25_1901" src="http://professionalvmware.com/wp-content/uploads/2009/01/20090125-1901-thumb.png" border="0" alt="2009-01-25_1901" width="244" height="142" /></a></p><p>The resulting window:<br
/> <a
href="http://professionalvmware.com/wp-content/uploads/2009/01/20090125-1902.png"><img
style="display: inline; border: 0px;" title="2009-01-25_1902" src="http://professionalvmware.com/wp-content/uploads/2009/01/20090125-1902-thumb.png" border="0" alt="2009-01-25_1902" width="242" height="244" /></a></p><p>The options you select here determine the logs you get… Be careful when doing this across your entire VI, as it may take quite some time. For our example, we’ll stick with just the Virtual Center logs. After that, select a path and hit OK! This generates a task, much like the following:</p><p><a
href="http://professionalvmware.com/wp-content/uploads/2009/01/20090125-1903.png"><img
style="display: inline; border: 0px;" title="2009-01-25_1903" src="http://professionalvmware.com/wp-content/uploads/2009/01/20090125-1903-thumb.png" border="0" alt="2009-01-25_1903" width="589" height="76" /></a></p><p>What this task does, is give you the time to go get a cup of coffee. Really (Remember the note above? Now imagine we did this across 200 hosts).  Done:</p><p><a
href="http://professionalvmware.com/wp-content/uploads/2009/01/20090126-0431.png"><img
style="display: inline; border: 0px;" title="2009-01-26_0431" src="http://professionalvmware.com/wp-content/uploads/2009/01/20090126-0431-thumb.png" border="0" alt="2009-01-26_0431" width="391" height="258" /></a></p><p>This task generates a folder in the location you specified prior. The contents of the folder file look very much like:</p><p><span
style="color: #000000;"><span
style="font-family: Courier New;">PS C:Documents and Settingscody.bunchDesktopVMware-VirtualCenter-support-2009-01-25@19-07-49&gt; dir </span></span></p><p><span
style="color: #000000;"><span
style="font-family: Courier New;"> Directory: C:Documents and Settingscody.bunchDesktopVMware-VirtualCenter-support-2009-01-25@19-07-49 </span></span></p><p><span
style="color: #000000;"><span
style="font-family: Courier New;">Mode                LastWriteTime     Length Name<br
/> &#8212;-                &#8212;&#8212;&#8212;&#8212;-     &#8212;&#8212; &#8212;-<br
/> d&#8212;-         1/25/2009   7:07 PM            viclient-support<br
/> -a&#8212;         1/25/2009   7:09 PM   76580475 </span><span
style="font-family: Courier New;">vcsupport-2009-01-25@19-07-49.zip</span></span></p><p>Contained within the sub folder are logs related to the VI Client. They look like:</p><p><span
style="color: #000000;"><span
style="font-family: Courier New;">PS C:Documents and Settingscody.bunchDesktopVMware-VirtualCenter-support-2009-01-25@19-07-49viclient-support&gt; dir </span></span></p><p><span
style="color: #000000;"><span
style="font-family: Courier New;"> Directory: C:Documents and Settingscody.bunchDesktopVMware-VirtualCenter-support-2009-01-25@19-07-49viclient-s<br
/> upport </span></span></p><p><span
style="color: #000000;"><span
style="font-family: Courier New;">Mode                LastWriteTime     Length Name<br
/> &#8212;-                &#8212;&#8212;&#8212;&#8212;-     &#8212;&#8212; &#8212;-<br
/> -a&#8212;         1/12/2009   9:15 PM      73010 viclient-0.log<br
/> -a&#8212;         1/18/2009   9:50 AM      43329 viclient-1.log<br
/> -a&#8212;         1/18/2009  10:49 AM     295807 viclient-2.log<br
/> -a&#8212;         1/18/2009  12:22 PM      63804 viclient-3.log<br
/> -a&#8212;         1/18/2009   9:29 PM      46094 viclient-4.log<br
/> -a&#8212;         1/19/2009   8:28 AM     106489 viclient-5.log<br
/> -a&#8212;         1/20/2009   1:30 PM      63542 viclient-6.log<br
/> -a&#8212;         1/20/2009   4:03 PM        133 viclient-7.log<br
/> -a&#8212;         1/25/2009   7:07 PM     142524 viclient-8.log<br
/> -a&#8212;          1/9/2009   8:17 PM     169476 viclient-9.log<br
/> -a&#8212;         1/25/2009   1:43 PM        235 viclient-index.xml</span></span></p><p><span
style="color: #000000;">Cool. Good to know but for the moment we’re after the Virtual Center logs, hidden in that zip file. Go ahead and extract that out, it’ll give you something like this:</span></p><p><span
style="color: #000000;"><span
style="font-family: Courier New;">PS C:Documents and Settingscody.bunchDesktopVMware-VirtualCenter-support-2009-01-25@19-07-49vcsupport-1-25-2009-19-<br
/> 4&gt; dir </span></span></p><p><span
style="color: #000000;"><span
style="font-family: Courier New;"> Directory: C:Documents and Settingscody.bunchDesktopVMware-VirtualCenter-support-2009-01-25@19-07-49vcsupport-<br
/> 1-25-2009-19-4 </span></span></p><p><span
style="color: #000000;"><span
style="font-family: Courier New;">Mode                LastWriteTime     Length Name<br
/> &#8212;-                &#8212;&#8212;&#8212;&#8212;-     &#8212;&#8212; &#8212;-<br
/> d&#8212;-         1/25/2009   7:09 PM            Config<br
/> d&#8212;-         1/25/2009   7:09 PM            DrmDumps<br
/> d&#8212;-         1/25/2009   7:08 PM            Logs<br
/> -a&#8212;         1/25/2009   7:09 PM       4003 tree-vc-support.txt<br
/> -a&#8212;         1/25/2009   7:04 PM         12 vc-support-ver.txt<br
/> -a&#8212;         1/25/2009   7:09 PM       9656 vc-support.log</span></span></p><p><span
style="color: #000000;">Config, DMP Dumps, and Logs. Looks like we’ve found the meat of this search. In the log’s folder you’ll find a *.csv and *.evt of the event logs on the system at the time this dump as taken. More importantly tho, you’ll also find the vpxd folder… these are the logs we’re after!</span></p><p><span
style="color: #000000;"><span
style="font-family: Courier New;">PS C:Documents and Settingscody.bunchDesktopVMware-VirtualCenter-support-2009-01-25@19-07-49vcsupport-1-25-2009-19-<br
/> 4Logsvpxd&gt; dir </span></span></p><p><span
style="color: #000000;"><span
style="font-family: Courier New;"> Directory: C:Documents and Settingscody.bunchDesktopVMware-VirtualCenter-support-2009-01-25@19-07-49vcsupport-<br
/> 1-25-2009-19-4Logsvpxd </span></span></p><p><span
style="color: #000000;"><span
style="font-family: Courier New;">Mode                LastWriteTime     Length Name<br
/> &#8212;-                &#8212;&#8212;&#8212;&#8212;-     &#8212;&#8212; &#8212;-<br
/> -a&#8212;         1/25/2009   7:04 PM    9437340 profiler-0.log<br
/> -a&#8212;         1/25/2009   6:05 AM  209715224 profiler-1.log<br
/> -a&#8212;         1/24/2009  11:40 AM  209715224 scoreboard-0.log<br
/> -a&#8212;         1/25/2009   7:05 PM   26585551 scoreboard-1.log<br
/> -a&#8212;         1/23/2009   7:33 AM    5242904 vpxd-0.log<br
/> -a&#8212;         1/25/2009   7:05 AM    5242904 vpxd-1.log<br
/> -a&#8212;         1/25/2009   7:04 PM    1719036 vpxd-2.log<br
/> -a&#8212;          1/9/2009   3:44 PM    5242904 vpxd-3.log<br
/> -a&#8212;         1/11/2009   1:50 PM    5242904 vpxd-4.log<br
/> -a&#8212;         1/13/2009  12:22 PM    5242904 vpxd-5.log<br
/> -a&#8212;         1/15/2009  12:35 PM    5242904 vpxd-6.log<br
/> -a&#8212;         1/17/2009  12:41 PM    5242904 vpxd-7.log<br
/> -a&#8212;         1/19/2009   8:48 AM    5242904 vpxd-8.log<br
/> -a&#8212;         1/21/2009   7:51 AM    5242904 vpxd-9.log</span></span></p><p><span
style="color: #000000;">On these I believe they count from 0 to 9, 9 being the oldest, 0 being the most recent, but the dates on these files seem to disagree with me…</span></p><p><span
style="color: #000000;">These logs, can also be grabbed using the VI Toolkit for windows like this:</span></p><p><span
style="color: #000000;"><span
style="font-family: Courier New;">PS C:&gt; get-log –bundle</span></span></p><p><span
style="color: #000000;">That’s it! Next time we’ll go over reading these a bit.</span></p> ]]></content:encoded> <wfw:commentRss>http://professionalvmware.com/2009/01/log-bundles-of-the-virtual-center-variety/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>1 Day Left &#8211; The Most Awesome PowerShell One-Liner in the History of PowerShell One-Liners!</title><link>http://professionalvmware.com/2008/12/1-day-left-the-most-awesome-powershell-one-liner-in-the-history-of-powershell-one-liners/</link> <comments>http://professionalvmware.com/2008/12/1-day-left-the-most-awesome-powershell-one-liner-in-the-history-of-powershell-one-liners/#comments</comments> <pubDate>Thu, 18 Dec 2008 15:40:00 +0000</pubDate> <dc:creator>bunchc</dc:creator> <category><![CDATA[API]]></category> <category><![CDATA[ESX]]></category> <category><![CDATA[esx 3.5]]></category> <category><![CDATA[esxi]]></category> <category><![CDATA[mystery]]></category> <category><![CDATA[powershell]]></category> <category><![CDATA[VI Toolkit]]></category> <category><![CDATA[VI3]]></category> <category><![CDATA[VM]]></category> <category><![CDATA[VMware]]></category> <category><![CDATA[VMware Powershell]]></category> <guid
isPermaLink="false">http://professionalvmware.com/2008/12/18/1-day-left-the-most-awesome-powershell-one-liner-in-the-history-of-powershell-one-liners/</guid> <description><![CDATA[get-datacenter MyVC &#124; get-vm &#124; Get-NetworkAdapter &#124; Where-Object { $_.Name -like &#34;*1&#34;} &#124; Set-NetworkAdapter -NetworkName NotThatNetwork -Confirm:$false So, say you provision all of your VM’s on one host, with one set of networks, that is completely removed from the remainder of your infrastructure. You then Cold-Migrate the new VM’s to their new homes. You now [...]]]></description> <content:encoded><![CDATA[<p></p><p><font
face="Courier New">get-datacenter MyVC | get-vm | Get-NetworkAdapter | Where-Object { $_.Name -like &quot;*1&quot;} | Set-NetworkAdapter -NetworkName NotThatNetwork -Confirm:$false</font></p><p>So, say you provision all of your VM’s on one host, with one set of networks, that is completely removed from the remainder of your infrastructure. You then Cold-Migrate the new VM’s to their new homes. You now need to chance the network names to match. What you say? You have a dozen, a hundred of them to change? The above PowerShell one-liner will take care of all of that for you.</p><p>Questions? Comments? Leave em in the comments.</p> ]]></content:encoded> <wfw:commentRss>http://professionalvmware.com/2008/12/1-day-left-the-most-awesome-powershell-one-liner-in-the-history-of-powershell-one-liners/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Book: Managing VMware Infrastructure With Windows PowerShell: TFM</title><link>http://professionalvmware.com/2008/12/book-managing-vmware-infrastructure-with-windows-powershell-tfm/</link> <comments>http://professionalvmware.com/2008/12/book-managing-vmware-infrastructure-with-windows-powershell-tfm/#comments</comments> <pubDate>Fri, 12 Dec 2008 22:39:00 +0000</pubDate> <dc:creator>bunchc</dc:creator> <category><![CDATA[books]]></category> <category><![CDATA[powershell]]></category> <category><![CDATA[VMware Powershell]]></category> <guid
isPermaLink="false">http://professionalvmware.com/2008/12/12/book-managing-vmware-infrastructure-with-windows-powershell-tfm/</guid> <description><![CDATA[Keep an eye out for this one early next year. I’ve been tech reviewing it since the beginning, and can tell you it’s something that you’ll want to keep next to your pillow at night. Ok, so maybe I’m the only one who does that, but it is nonetheless a good read. (I may even [...]]]></description> <content:encoded><![CDATA[<p></p><p><a
href="http://halr9000.com/article/663"><img
src="http://halr9000.com/stuff/BookCover_10CAB/ManagingVMWareInfrastructurewithWindowsPowerShellcoverLarge_3.jpg" /></a></p><p>Keep an eye out for this one early next year. I’ve been tech reviewing it since the beginning, and can tell you it’s something that you’ll want to keep next to your pillow at night. Ok, so maybe I’m the only one who does that, but it is nonetheless a good read. (I may even have a case study or two in it… maybe)</p> ]]></content:encoded> <wfw:commentRss>http://professionalvmware.com/2008/12/book-managing-vmware-infrastructure-with-windows-powershell-tfm/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>On Laziness &#8211; VMware Infrastructure Toolkit (for Windows)</title><link>http://professionalvmware.com/2008/11/on-laziness-vmware-infrastructure-toolkit-for-windows/</link> <comments>http://professionalvmware.com/2008/11/on-laziness-vmware-infrastructure-toolkit-for-windows/#comments</comments> <pubDate>Tue, 11 Nov 2008 03:40:00 +0000</pubDate> <dc:creator>bunchc</dc:creator> <category><![CDATA[automation]]></category> <category><![CDATA[esx 3.5]]></category> <category><![CDATA[esxi]]></category> <category><![CDATA[powershell]]></category> <category><![CDATA[VI Toolkit]]></category> <category><![CDATA[VI3]]></category> <category><![CDATA[VMware]]></category> <category><![CDATA[VMware Powershell]]></category> <guid
isPermaLink="false">http://professionalvmware.com/?p=8</guid> <description><![CDATA[I have a confession to make. It is dire in nature, and will likely surprise most of you. I&#8217;m lazy. So much so, that I&#8217;m a professional at it. I suppose that sounds pretty bad, and if my boss is reading this (I doubt he is), it&#8217;s also quite incriminating, so lets qualify a bit. [...]]]></description> <content:encoded><![CDATA[<p></p><p><img
src="http://img357.imageshack.us/img357/3964/zrclip003p28f19ab3wu6.png" height="224" width="300"/></p><p><p>I have a confession to make. It is dire in nature, and will likely surprise most of you. I&#8217;m lazy. So much so, that I&#8217;m a professional at it. I suppose that sounds pretty bad, and if my boss is reading this (I doubt he is), it&#8217;s also quite incriminating, so lets qualify a bit. I am not a fan of repetitive tasks, and as such, will do most anything in my power to not do them, or do them as easily as possible.</p><p><p>This comes in quite handy with virtualization, as well, it lends itself quite well to it (server instances contained within files, etc.). Fortunately, VMware makes this quite easy for us as well, providing many, many different methods of accessing their API (Application Programming Interface, or fancy programming speak for &#8220;That which is made of awesome&#8221;).</p><p><p>In fact they publish a pretty well documented API, and several SDK&#8217;s or software development kits for just this purpose. You can get info on these <a
href="http://www.vmware.com/download/sdk/">here</a>.</p><p><p
style="MARGIN: 0in 0in 0pt">As your Virtual Infrastructure is likely to be running at least one Windows box (Virtual Center). The <a
href="http://vmware.com/go/powershell">VI Toolkit for Windows</a> comes quite in handy.</p><p><p
style="MARGIN: 0in 0in 0pt"></p><p><p
style="MARGIN: 0in 0in 0pt">The VI Toolkit for Windows is a set of PowerShell cmdlets for managing Virtual Infrastructure, that is easy to learn, and makes automation of routine tasks very, very simple.</p><p><p
style="MARGIN: 0in 0in 0pt"></p><p><p
style="MARGIN: 0in 0in 0pt">Let&#8217;s take a look:</p><p><blockquote><p><strong><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New"><strong><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New">Connect-VIServer</span></strong> <em><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New">-Server</span></em> <span
style="COLOR: #800080; FONT-FAMILY: Courier New">$datacenter<br
/><br/></span> <strong><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New"><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New"><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New">Get-VM</span></span></span></strong><span
style="FONT-FAMILY: Courier New"><span
style="FONT-FAMILY: Courier New">|</span></span> <strong><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New"><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New"><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New">Get-Snapshot</span></span></span></strong><span
style="FONT-FAMILY: Courier New"><span
style="FONT-FAMILY: Courier New">|</span></span> <span
style="COLOR: #0000ff; FONT-FAMILY: Courier New"><span
style="COLOR: #0000ff; FONT-FAMILY: Courier New"><span
style="COLOR: #0000ff; FONT-FAMILY: Courier New">where</span></span></span><span
style="FONT-FAMILY: Courier New"><span
style="FONT-FAMILY: Courier New">{</span></span> <span
style="COLOR: #000080; FONT-FAMILY: Courier New"><span
style="COLOR: #000080; FONT-FAMILY: Courier New"><span
style="COLOR: #000080; FONT-FAMILY: Courier New">$_</span></span></span><span
style="FONT-FAMILY: Courier New"><span
style="FONT-FAMILY: Courier New">.Created</span></span> <span
style="COLOR: #ff0000; FONT-FAMILY: Courier New"><span
style="COLOR: #ff0000; FONT-FAMILY: Courier New"><span
style="COLOR: #ff0000; FONT-FAMILY: Courier New">-le</span></span></span><span
style="FONT-FAMILY: Courier New"><span
style="FONT-FAMILY: Courier New">(</span></span><strong><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New"><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New"><span
style="COLOR: #5f9ea0; FONT-FAMILY: Courier New">Get-Date</span></span></span></strong><span
style="FONT-FAMILY: Courier New"><span
style="FONT-FAMILY: Courier New">).AddDays(-7)}</span></span></span></strong></p><p></p></blockquote><p><p>So what&#8217;s it do? It connects to a virtual center server or esxhost $datacenter, gets a list of VM&#8217;s, and checks them for snapshots over 7 days old.</p><p><p
xmlns="" class="zoundry_raven_tags"> <br
/> <span
class="ztags"><span
class="ztagspace">Technorati</span> : <a
href="http://www.technorati.com/tag/Automation" class="ztag" rel="tag">Automation</a>, <a
href="http://www.technorati.com/tag/VI3" class="ztag" rel="tag">VI3</a>, <a
href="http://www.technorati.com/tag/VMware" class="ztag" rel="tag">VMware</a>, <a
href="http://www.technorati.com/tag/esx+3.5" class="ztag" rel="tag">esx 3.5</a>, <a
href="http://www.technorati.com/tag/esxi" class="ztag" rel="tag">esxi</a>, <a
href="http://www.technorati.com/tag/powershell" class="ztag" rel="tag">powershell</a>, <a
href="http://www.technorati.com/tag/vmware+powershell" class="ztag" rel="tag">vmware powershell</a>, <a
href="http://www.technorati.com/tag/vmware+toolkit" class="ztag" rel="tag">vmware toolkit</a></span> <br/><br
/> <span
class="ztags"><span
class="ztagspace">Del.icio.us</span> : <a
href="http://del.icio.us/tag/Automation" class="ztag" rel="tag">Automation</a>, <a
href="http://del.icio.us/tag/VI3" class="ztag" rel="tag">VI3</a>, <a
href="http://del.icio.us/tag/VMware" class="ztag" rel="tag">VMware</a>, <a
href="http://del.icio.us/tag/esx%203.5" class="ztag" rel="tag">esx 3.5</a>, <a
href="http://del.icio.us/tag/esxi" class="ztag" rel="tag">esxi</a>, <a
href="http://del.icio.us/tag/powershell" class="ztag" rel="tag">powershell</a>, <a
href="http://del.icio.us/tag/vmware%20powershell" class="ztag" rel="tag">vmware powershell</a>, <a
href="http://del.icio.us/tag/vmware%20toolkit" class="ztag" rel="tag">vmware toolkit</a></span> <br/><br
/> <span
class="ztags"><span
class="ztagspace">Zooomr</span> : <a
href="http://www.zooomr.com/search/photos/?q=Automation" class="ztag" rel="tag">Automation</a>, <a
href="http://www.zooomr.com/search/photos/?q=VI3" class="ztag" rel="tag">VI3</a>, <a
href="http://www.zooomr.com/search/photos/?q=VMware" class="ztag" rel="tag">VMware</a>, <a
href="http://www.zooomr.com/search/photos/?q=esx%203.5" class="ztag" rel="tag">esx 3.5</a>, <a
href="http://www.zooomr.com/search/photos/?q=esxi" class="ztag" rel="tag">esxi</a>, <a
href="http://www.zooomr.com/search/photos/?q=powershell" class="ztag" rel="tag">powershell</a>, <a
href="http://www.zooomr.com/search/photos/?q=vmware%20powershell" class="ztag" rel="tag">vmware powershell</a>, <a
href="http://www.zooomr.com/search/photos/?q=vmware%20toolkit" class="ztag" rel="tag">vmware toolkit</a></span> <br/><br
/> <span
class="ztags"><span
class="ztagspace">Flickr</span> : <a
href="http://www.flickr.com/photos/tags/Automation" class="ztag" rel="tag">Automation</a>, <a
href="http://www.flickr.com/photos/tags/VI3" class="ztag" rel="tag">VI3</a>, <a
href="http://www.flickr.com/photos/tags/VMware" class="ztag" rel="tag">VMware</a>, <a
href="http://www.flickr.com/photos/tags/esx%203.5" class="ztag" rel="tag">esx 3.5</a>, <a
href="http://www.flickr.com/photos/tags/esxi" class="ztag" rel="tag">esxi</a>, <a
href="http://www.flickr.com/photos/tags/powershell" class="ztag" rel="tag">powershell</a>, <a
href="http://www.flickr.com/photos/tags/vmware%20powershell" class="ztag" rel="tag">vmware powershell</a>, <a
href="http://www.flickr.com/photos/tags/vmware%20toolkit" class="ztag" rel="tag">vmware toolkit</a></span></p> ]]></content:encoded> <wfw:commentRss>http://professionalvmware.com/2008/11/on-laziness-vmware-infrastructure-toolkit-for-windows/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
