<?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>Virtu-Al.Net &#187; PowerShell</title>
	<atom:link href="http://www.virtu-al.net/category/powershell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.virtu-al.net</link>
	<description>Virtually everything is poshable</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:47:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>vCheck 6.0 released</title>
		<link>http://www.virtu-al.net/2012/02/08/vcheck-6-0-released/</link>
		<comments>http://www.virtu-al.net/2012/02/08/vcheck-6-0-released/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 20:54:35 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">http://www.virtu-al.net/?p=2422</guid>
		<description><![CDATA[One of the most popular scripts on my site with 26,966 downloads of v5 has been the vCheck script, for those of you who haven&#8217;t seen this yet here is a quick summary of this script: Summary vCheck is a vCenter checking script, the script is designed to run as a scheduled task before you [...]<p><a href="http://www.virtu-al.net/2012/02/08/vcheck-6-0-released/">vCheck 6.0 released</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></description>
			<content:encoded><![CDATA[<p>One of the most popular scripts on my site with 26,966 downloads of v5 has been the vCheck script, for those of you who haven&#8217;t seen this yet here is a quick summary of this script:</p>
<h2>Summary</h2>
<p>vCheck is a vCenter checking script, the script is designed to run as a <a href="http://www.virtu-al.net/2009/07/10/running-a-powercli-scheduled-task/">scheduled task</a> before you get into the office to present you with key information via an email directly to your inbox in a nice easily readable format.</p>
<p>This script picks on the key known issues and potential issues of the virtual infrastructure and reports it all in one place so all you do in the morning is check your email.</p>
<p>One of they key things about this report is if there is no issue in a particular place you will not receive that section in the email, for example if there are no datastores with less than 5% free space (configurable) then the disk space section will not show in the email, this ensures that you have only the information you need in front of you when you get into the office.</p>
<p>This script is not to be confused with an Audit script, I don’t want to remind you that you have 5 hosts and what there names are and how many CPU’s they have each and every day as you don’t want to read that kind of information unless you need it, this script will only tell you about problem areas with your infrastructure.</p>
<h2></h2>
<p><span id="more-2422"></span></p>
<h2>So What&#8217;s new in 6.0</h2>
<p>vCheck 6.0 has been updated to be more community driven and easier to expand, the checks have been removed and put into <a href="http://www.virtu-al.net/featured-scripts/vcheck/vcheck-plugins/">separate plugins</a> which make it easier for people to contribute. Make sure you check out the <a href="http://www.virtu-al.net/featured-scripts/vcheck/vcheck-plugins/">plugins page</a> for a list of the plugins and what they check for.</p>
<p>The HTML output has been reformatted to work with newer versions of Outlook. (Lots of previous comments on this!)</p>
<p>A Setup Wizard has been added for easy setup and no more need to reference the vCenter address as a parameter of the script.</p>
<p><a href="http://virtu-al.net/images/vCheck-6-released_12358/SNAGHTML5837f2c6.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="SNAGHTML5837f2c6" src="http://virtu-al.net/images/vCheck-6-released_12358/SNAGHTML5837f2c6_thumb.png" alt="SNAGHTML5837f2c6" width="644" height="210" border="0" /></a></p>
<p>As the plugins have been moved out it makes this HTML report framework easy to adapt to other PowerShell enabled products like</p>
<ul>
<li>VMware vCD (Already started this one)</li>
<li>Sharepoint</li>
<li>Exchange</li>
<li>vShield</li>
<li>VMware View</li>
<li>SQL</li>
<li>Active Directory</li>
<li>and more.</li>
</ul>
<p>Please contact me if your interested to start your own using this template.</p>
<p>A header image has been added to the HTML report to make the report more customizable..</p>
<p><a href="http://virtu-al.net/images/vCheck-6-released_12358/SNAGHTML583ab440.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="SNAGHTML583ab440" src="http://virtu-al.net/images/vCheck-6-released_12358/SNAGHTML583ab440_thumb.png" alt="SNAGHTML583ab440" width="640" height="184" border="0" /></a></p>
<p>And much much more including lots of speed enhancements.</p>
<h2>Big Thanks</h2>
<p>Lastly I want to add a big thanks to everyone who has ever run this script and continues to use it, I hope you will find this version as useful as the previous versions.  Thanks to the Beta testers, I couldn’t have done it without you, you all came up with some great ideas and additions which made it hard for me to finish developing and releasing – I think I have enough for v7 !</p>
<p>And lastly thanks to anyone who writes a plugin themselves and sends it through to me to include on the plugins page.  Keep an eye out soon for some information on how you can easily add new plugins and check your current plugins.</p>
<h2>Download</h2>
<p><a href="http://www.virtu-al.net/featured-scripts/vcheck/">As always, please head over the the vCheck page on this site to download the script.</a></p>
<p><a href="http://www.virtu-al.net/2012/02/08/vcheck-6-0-released/">vCheck 6.0 released</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.virtu-al.net/2012/02/08/vcheck-6-0-released/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Using PowerShell with Internet Explorer</title>
		<link>http://www.virtu-al.net/2012/01/25/using-powershell-with-internet-explorer/</link>
		<comments>http://www.virtu-al.net/2012/01/25/using-powershell-with-internet-explorer/#comments</comments>
		<pubDate>Wed, 25 Jan 2012 09:34:39 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.virtu-al.net/?p=2401</guid>
		<description><![CDATA[PowerShell is a great language, I am often amazed at how far it can actually reach and what you can gather data, write data or use data from. Mainly I use PowerShell to manage my VMware environment but last night I broke from my comfort zone and took some time to see what I was [...]<p><a href="http://www.virtu-al.net/2012/01/25/using-powershell-with-internet-explorer/">Using PowerShell with Internet Explorer</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></description>
			<content:encoded><![CDATA[<p>PowerShell is a great language, I am often amazed at how far it can actually reach and what you can gather data, write data or use data from.</p>
<p>Mainly I use PowerShell to manage my VMware environment but last night I broke from my comfort zone and took some time to see what I was able to do with Internet Explorer – Did you know you can programmatically browse the web with PowerShell ?  Well you can!</p>
<h2>The Reason</h2>
<p>First thing I needed was a reason, at the moment there is <a href="http://www.surveygizmo.com/s3/786135/Top-VMware-virtualization-blogs-2012" target="_blank">a poll for top virtualization blogs</a>, last year I surprisingly did very well in this and would like to thank anyone who voted for me.  This year as I was filling it out and selecting some of my favorite blogs from the list.  People like Duncan Epping, Eric Sloof, William Lam, Luc Dekens, Jonathan Medd, Frank Denneman the list goes on and on and then I found my blog tucked away near the bottom amongst the other blogs beginning with V… as this is a virtualization top list you can imagine there were a few beginning with V!</p>
<p>Anyway, I thought there must be an easier way to allow people to vote for me than to hope they find me amongst the V’s and don’t get bored along the way and choose others so here it is:</p>
<p>The below script is not a cheating script, it will not make you vote for me 1000 times it will simply start internet explorer, browse to the survey and select my site for you, one this has done you are free to deselect me if you wish and also select the other 9 participants you would like to vote for.  After this just follow on through the survey and click Submit to finish.</p>
<p>Obviously with PowerShell I could have just added my favorite bloggers to this script and completed the survey for you but that would be cheating and I believe in the freedom to vote!</p>
<p>So if you have not yet voted then simply paste the following code into a PowerShell window and watch it control internet explorer and automatically select Virtu-Al from the list, the other choices are up to you!</p>
<pre class="brush: powershell; title: ; notranslate">$URL = &quot;http://www.surveygizmo.com/s3/786135/Top-VMware-virtualization-blogs-2012&quot;
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$true
$ie.navigate($URL)
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.Document.getElementById(&quot;sg_NextButton&quot;).click()
$ie.Document.getElementById(&quot;sgE-786135-1-27-10906&quot;).Click() # Click Virtu-Al</pre>
<p><a href="http://www.virtu-al.net/2012/01/25/using-powershell-with-internet-explorer/">Using PowerShell with Internet Explorer</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.virtu-al.net/2012/01/25/using-powershell-with-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PowerCLI Android and iPhone App</title>
		<link>http://www.virtu-al.net/2012/01/19/powercli-android-app/</link>
		<comments>http://www.virtu-al.net/2012/01/19/powercli-android-app/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 14:47:19 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">http://www.virtu-al.net/?p=2388</guid>
		<description><![CDATA[A while back I found an iPhone and iPad app which allowed you to reference the PowerCLI Cmdlets, this is quite useful when you are on the move and need a quick reference. Today I came across a similar app for the android and also iPhone and wanted to share it. vPowerCLI5 Reference is an [...]<p><a href="http://www.virtu-al.net/2012/01/19/powercli-android-app/">PowerCLI Android and iPhone App</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></description>
			<content:encoded><![CDATA[<p>A while back I found <a href="http://www.virtu-al.net/2010/01/19/powercli-on-the-iphone/" target="_blank">an iPhone and iPad app which allowed you to reference the PowerCLI Cmdlets</a>, this is quite useful when you are on the move and need a quick reference.</p>
<p>Today I came across a similar app for the android and also iPhone and wanted to share it.</p>
<p>vPowerCLI5 Reference is an app for Android which can be downloaded from here:</p>
<p>Android: <a title="http://droidmill.com/vpowercli5-reference-405917.html#.Txgq7ZiE6-8" href="http://droidmill.com/vpowercli5-reference-405917.html#.Txgq7ZiE6-8">http://droidmill.com/vpowercli5-reference-405917.html#.Txgq7ZiE6-8</a></p>
<p>iPhone: <a title="http://itunes.apple.com/us/app/vpowercli5-reference/id489731144?mt=8" href="http://itunes.apple.com/us/app/vpowercli5-reference/id489731144?mt=8">http://itunes.apple.com/us/app/vpowercli5-reference/id489731144?mt=8</a></p>
<blockquote><p>This tool is to be used for referencing the VMware vSphere PowerCLI cmdlets. vSphere PowerCLI is a command-line and scripting tool built on Windows PowerShell, and is used for managing and automating vSphere.</p></blockquote>
<p>It looks like this is a Android/iPhone friendly version of the online PowerCLI help which can be found here:</p>
<p><a title="http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/index.html" href="http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/index.html">http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/index.html</a></p>
<p><a href="http://virtu-al.net/images/PowerCLI-Android-App_CE24/image_4.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; float: left; padding-top: 0px; border-width: 0px;" title="image" src="http://virtu-al.net/images/PowerCLI-Android-App_CE24/image_thumb_4.png" alt="image" width="161" height="276" align="left" border="0" /></a></p>
<p><a href="http://virtu-al.net/images/PowerCLI-Android-App_CE24/image_5.png"><img style="background-image: none; margin: 0px 6px; padding-left: 0px; padding-right: 0px; display: inline; float: left; padding-top: 0px; border-width: 0px;" title="image" src="http://virtu-al.net/images/PowerCLI-Android-App_CE24/image_thumb_5.png" alt="image" width="164" height="277" align="left" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>This post was updated to include iPhone app.</p>
<p><a href="http://www.virtu-al.net/2012/01/19/powercli-android-app/">PowerCLI Android and iPhone App</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.virtu-al.net/2012/01/19/powercli-android-app/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using Console2 with PowerShell and PowerCLI</title>
		<link>http://www.virtu-al.net/2012/01/15/using-console2-with-powershell-and-powercli/</link>
		<comments>http://www.virtu-al.net/2012/01/15/using-console2-with-powershell-and-powercli/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 20:58:32 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">http://www.virtu-al.net/?p=2382</guid>
		<description><![CDATA[I may be a late comer to this app but there is a cool free app here called Console2.  I am now using it for the quick work I need to do in PowerCLI and PowerShell, the stuff I dont need to save or need an editor for. Its great as a portable app, I [...]<p><a href="http://www.virtu-al.net/2012/01/15/using-console2-with-powershell-and-powercli/">Using Console2 with PowerShell and PowerCLI</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></description>
			<content:encoded><![CDATA[<p>I may be a late comer to this app but there is a cool free app <a href="http://sourceforge.net/projects/console/" target="_blank">here</a> called Console2.  I am now using it for the quick work I need to do in PowerCLI and PowerShell, the stuff I dont need to save or need an editor for.</p>
<p>Its great as a portable app, I have it in my DropBox folder and its syncd between my PC’s as well as being on a USB key so I can use it from anywhere.</p>
<p>I like the way you can resize the window and it resizes the buffer and the copy and paste is also enhanced from the normal console.</p>
<p>I have packaged my settings and logos up so you too can see what I see, just download the settings file from below and <a href="http://sourceforge.net/projects/console/" target="_blank">Console2 from here</a> and extract them into the same folder.</p>
<p><a  title='Console2 Settings' href='http://www.virtu-al.net/?wpdmact=process&did=MTUuaG90bGluaw==' style="background:url('http://www.virtu-al.net/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Console2 Settings</a></p>
<h3>Eye Candy</h3>
<p><a href="http://virtu-al.net/images/Using-Console2-with-PowerShell-and-Power_B4EC/Console2.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Console2" src="http://virtu-al.net/images/Using-Console2-with-PowerShell-and-Power_B4EC/Console2_thumb.jpg" alt="Console2" width="244" height="208" border="0" /></a></p>
<p><a href="http://virtu-al.net/images/Using-Console2-with-PowerShell-and-Power_B4EC/Console2PS.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Console2PS" src="http://virtu-al.net/images/Using-Console2-with-PowerShell-and-Power_B4EC/Console2PS_thumb.jpg" alt="Console2PS" width="244" height="216" border="0" /></a></p>
<p><a href="http://www.virtu-al.net/2012/01/15/using-console2-with-powershell-and-powercli/">Using Console2 with PowerShell and PowerCLI</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.virtu-al.net/2012/01/15/using-console2-with-powershell-and-powercli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updating your Image Profile</title>
		<link>http://www.virtu-al.net/2012/01/06/updating-your-image-profile/</link>
		<comments>http://www.virtu-al.net/2012/01/06/updating-your-image-profile/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 16:27:17 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[Auto Deploy]]></category>
		<category><![CDATA[Image Builder]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">http://www.virtu-al.net/?p=2373</guid>
		<description><![CDATA[If you have been using the image builder and auto deploy cmdlets which came with vSphere 5.0 then you will already know how easy it is to completely rebuild all hosts just by replacing a simple auto deploy rule with your new image profile and then rebooting your hosts. But how do you create your [...]<p><a href="http://www.virtu-al.net/2012/01/06/updating-your-image-profile/">Updating your Image Profile</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></description>
			<content:encoded><![CDATA[<p>If you have been using the image builder and auto deploy cmdlets which came with vSphere 5.0 then you will already know how easy it is to completely rebuild all hosts just by replacing a simple auto deploy rule with your new image profile and then rebooting your hosts.</p>
<h3>But how do you create your new image profile ?</h3>
<p>An Image profile normally consists of a base ESXi image downloaded from VMware and then some custom software packages added in to ensure you have all the third party addons, drivers and utilities needed for the host to work with your infrastructure.</p>
<p>An example of this is the EMC PowerPath Software Package or the HP ESXi Proliant offline bundle, others may include the software package needed for the vCD Agent.</p>
<p>Once these software packages have been added to your image profile you are then able to export it back as an offline zip file, ISO file or use it in you Auto Deploy rule-set.</p>
<p>But when it comes to updating you need to remember which software packages you added to which build of ESX and repeat this procedure, this can be time consuming.</p>
<h2>Introducing Update-ESXImageProfile</h2>
<p>Did you know that VMware has an online repository of up to date versions of ESXi Software Depots ?  You can easily add this to your Image Builder session with the following line of code:</p>
<pre class="brush: powershell; title: ; notranslate">Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml</pre>
<p><a href="http://virtu-al.net/images/Updating-your-Image-Profile_E026/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://virtu-al.net/images/Updating-your-Image-Profile_E026/image_thumb.png" alt="image" width="644" height="306" border="0" /></a></p>
<p>Using this online depot I was able to create a script which would download any newer software packages from the base ESXi Software Depot online and compare these against your current image profile, once this has been done it will add these latest versions to your image profile ensuring you have an up-to-date Image Profile.</p>
<p>Of course you will need to make sure you export this as a zip again so you can use it in the future and also add it to your Auto Deploy rule-set and reboot your hosts.</p>
<h2>See it in action</h2>
<p><iframe src="http://player.vimeo.com/video/34664136?title=0&amp;byline=0&amp;portrait=0" frameborder="0" width="500" height="400"></iframe></p>
<h2>The Script</h2>
<pre class="brush: powershell; title: ; notranslate">Function Update-ESXImageProfile ($ImageProfile, $tools){
	if ($ImageProfile.Readonly) {
		Write-Host &quot;Your ImageProfile is read-only and therefore cannot be updated, please use a custom ImageProfile&quot;
	} Else {
		Write &quot;Loading online Software Depot&quot;
		$SD = Add-EsxSoftwareDepot -DepotUrl https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
		If ($tools) {
			$NEWIP = Get-EsxImageProfile -Vendor &quot;VMware, Inc.&quot; | Sort ModifiedTime -Descending | Where { $_.Name -notlike &quot;*tools&quot; } | Select -First 1
		} Else {
			$NEWIP = Get-EsxImageProfile -Vendor &quot;VMware, Inc.&quot; | Sort ModifiedTime -Descending | Where { $_.Name -like &quot;*tools&quot; } | Select -First 1
		}
		Write-Host &quot;New Image Profile found called $($NEWIP.Name)...&quot;
		Write-Host &quot;Checking for updated packages which do not exist in $ImageProfile&quot;
		$Compare = Compare-EsxImageProfile -ReferenceProfile $ImageProfile -ComparisonProfile $NEWIP
		$Updates = ($Compare | Select -ExpandProperty UpgradeFromRef)
		If ($Updates) {
			Foreach ($SP in $Updates) {
				$UpdatedPackage = Get-EsxSoftwarePackage | Where {$_.Guid -eq $SP}
				Write-Host &quot;Adding $($UpdatedPackage.Name) to $ImageProfile&quot;
				$Add = Add-EsxSoftwarePackage -ImageProfile $ImageProfile -SoftwarePackage $UpdatedPackage
			}
		}
		$OnlyInComp = ($Compare | Select -ExpandProperty OnlyInComp)
		If ($OnlyInComp) {
			Foreach ($SP in $OnlyInComp) {
				$UpdatedPackage = Get-EsxSoftwarePackage | Where {$_.Guid -eq $SP}
				Write-Host &quot;Adding $($UpdatedPackage.Name) to $ImageProfile&quot;
				$Add = Add-EsxSoftwarePackage -ImageProfile $ImageProfile -SoftwarePackage $UpdatedPackage
			}
		}
		If ((-not $OnlyInComp) -and (-not $Updates)) {
			Write-Host &quot;No Updates found for $ImageProfile&quot;
		}
	}
}

Update-ESXImageProfile -ImageProfile &quot;CustomImageProfile&quot; -Tools $true</pre>
<p><a href="http://www.virtu-al.net/2012/01/06/updating-your-image-profile/">Updating your Image Profile</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.virtu-al.net/2012/01/06/updating-your-image-profile/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VMware vShield PowerShell Module</title>
		<link>http://www.virtu-al.net/2012/01/04/vmware-vshield-powershell-module/</link>
		<comments>http://www.virtu-al.net/2012/01/04/vmware-vshield-powershell-module/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 17:07:10 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[vShield]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">http://www.virtu-al.net/?p=2363</guid>
		<description><![CDATA[A while back I was asked if we could automate some areas of vShield, VMware Security suite of products.  I was asked to do this for a demo which was to be used at VMworld, having never touched vShield before I was thrown into the world of security at the deep end.  The first thing [...]<p><a href="http://www.virtu-al.net/2012/01/04/vmware-vshield-powershell-module/">VMware vShield PowerShell Module</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></description>
			<content:encoded><![CDATA[<p>A while back I was asked if we could automate some areas of vShield, VMware Security suite of products.  I was asked to do this for a demo which was to be used at VMworld, having never touched vShield before I was thrown into the world of security at the deep end.  The first thing I found on my quest was the vShield API, there is a <a href="http://www.vmware.com/pdf/vshield_50_api.pdf?rct=j&amp;q=vshield%20%20rest%20api%205.0&amp;source=web&amp;cd=1&amp;ved=0CCMQFjAA&amp;url=https://www.vmware.com/go/vshield-API-Guide&amp;ei=iIYET7vGN_LMiQKrvOG4Dg&amp;usg=AFQjCNHd_7p4rEQVoXFyWGCBJFEO0TlhNg&amp;sig2=o8ndKdYl198gePYRZyUptQ">great document by VMware which explains the vShield proprietary Web-RPC API (Based on Rest API)</a> and all the calls you would ever need to make to work with the vShield products.</p>
<p>Now I had the API details I knew I could easily write some PowerShell code in the form of an advanced function to work with the API, the first piece of code I wrote was a generic function which allowed me to GET, PUT, DELETE and POST to a proprietary Web-RPC based Restful API. I know PowerShell v3 will include cmdlets for this but I didn’t want to wait or add a dependency on something which wasn’t available as yet.</p>
<p><span id="more-2363"></span>With this completed the rest of the advanced functions were easily created, it was just a case of sending the correct parameter to my function and the correct URL and my results would be returned.</p>
<p>So why would we want to do this ?</p>
<p>Automation is a powerful tool, with automation we can not only make our lives as administrators easier and less cumbersome but also enable products to do things automagically that they never could do before.</p>
<p>I will add more and more posts for this module to show you what I mean but first things first I just wanted to get the module out here and available for feedback and general usage.</p>
<p>Don’t forget my other posts around automating vShield here:</p>
<ul>
<li><a href="http://www.virtu-al.net/2011/09/14/powershell-automated-install-of-vshield-5/">PowerShell automated install of vShield 5</a></li>
<li><a href="http://www.virtu-al.net/2011/09/30/automated-install-of-vshield-services/">Automated install of vShield Services</a></li>
</ul>
<h2>Requirements</h2>
<ul>
<li>PowerShell v2</li>
<li>PowerCLI (Latest Version)</li>
<li>vShield Module (See Downloads area on this page)</li>
<li>vShield Manager 5.0</li>
<li>vCenter</li>
</ul>
<h2>Download</h2>
<p>You can download the module here:</p>
<p><a  title='vShield PowerShell Module v1.0' href='http://www.virtu-al.net/?wpdmact=process&did=MTQuaG90bGluaw==' style="background:url('http://www.virtu-al.net/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Download</a></p>
<h2>Install and Usage</h2>
<p>The below video will take you through the install and give you enough to get started:<br />
<iframe src="http://player.vimeo.com/video/34564214?title=0&amp;byline=0&amp;portrait=0" frameborder="0" width="500" height="400"></iframe></p>
<h2>Feedback</h2>
<p>If there is anything you have ever wanted to automate with vShield but didn’t know how then please let me know, the cmdlets are easily adjusted.</p>
<p><a href="http://www.virtu-al.net/2012/01/04/vmware-vshield-powershell-module/">VMware vShield PowerShell Module</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.virtu-al.net/2012/01/04/vmware-vshield-powershell-module/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>VM Start-up script</title>
		<link>http://www.virtu-al.net/2011/12/14/vm-start-up-script/</link>
		<comments>http://www.virtu-al.net/2011/12/14/vm-start-up-script/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 00:11:23 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">http://www.virtu-al.net/?p=2350</guid>
		<description><![CDATA[Back in Jan 2010 I wrote a script which shut down the virtual infrastructure, this was used to ensure your VMs were shut down and then your hosts were shut down in an orderly manner, ideal for things like UPS shutdown scripts etc. A slight spin on that is a Start-Up script, I was asked [...]<p><a href="http://www.virtu-al.net/2011/12/14/vm-start-up-script/">VM Start-up script</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></description>
			<content:encoded><![CDATA[<p>Back in Jan 2010 I wrote a script which <a href="http://www.virtu-al.net/2010/01/06/powercli-shutdown-your-virtual-infrastructure/" target="_blank">shut down the virtual infrastructure</a>, this was used to ensure your VMs were shut down and then your hosts were shut down in an orderly manner, ideal for things like UPS shutdown scripts etc.</p>
<p>A slight spin on that is a Start-Up script, I was asked by a couple of people if I had one of these, it also becomes more relevant with the vCenter Virtual appliance, no need for HA and DRS rules or to manually search for the vCenter Virtual Appliance if there is a power outage.</p>
<p>The script below will connect to all hosts you define at the start, these could obviously be read from a csv, xml file or a database etc but I just define them in a variable for ease of the script.</p>
<p>The script will firstly connect to each of these hosts in turn, once connected it will search for the first VMs, in my case this is a couple of domain controllers, it could be database servers or any other infrastructure servers which need to come up before vCenter.   Once these VMs have been found the script will start them and wait for their tools status to be ready, this is an easy way to check that the VM is started completely.</p>
<p>Once the infrastructure servers are started it will then search for your vCenter VM, this could be on any of the connected hosts, it will start it and again wait until the tools return as being completely started.</p>
<h2></h2>
<p><span id="more-2350"></span></p>
<h2>The Script</h2>
<pre class="brush: powershell; title: ; notranslate">$MyHosts = &quot;192.168.0.101&quot;, &quot;192.168.0.102&quot;
$username = &quot;root&quot;
$password = &quot;p@$$w0rd&quot;
$DomainSRV = &quot;DOMAIN01&quot;, &quot;DOMAIN02&quot;
$VirtualVC = &quot;vCenter01&quot;

$AllowMultiple = Set-PowerCLIConfiguration -DefaultVIServerMode Multiple -Confirm:$false

$MyHosts | Foreach {
Write-Host &quot;Connecting to host: $($_)&quot;
$connection = Connect-VIServer $_ -User $username -Password $password
}

$VM = Get-VM $DomainSRV
$VM | Foreach {
Write-Host &quot;Starting $($_.name) found on $($_.VMHost)&quot;
$StaringVMs = Start-VM $_ -Confirm:$false -RunAsync
}

$VM | Foreach {
do {
$VM = Get-VM $_
$Toolsstatus = $VM.ExtensionData.Guest.ToolsRunningStatus
Write-Host &quot;Waiting for $VM to start, tools status is $Toolsstatus&quot;
Sleep 7
} until ($Toolsstatus -eq &quot;guestToolsRunning&quot;)
}

$StartVC = Get-VM $VirtualVC | Start-VM -Confirm:$false

do {
$VM = Get-VM $VirtualVC
$Toolsstatus = $VM.ExtensionData.Guest.ToolsRunningStatus
Write-Host &quot;Waiting for $VM to start, tools status is $Toolsstatus&quot;
Sleep 7
} until ($Toolsstatus -eq &quot;guestToolsRunning&quot;)

Write-Host -ForegroundColor Yellow &quot;vCenter Server started, please connect as normal&quot;
</pre>
<h2>In Action</h2>
<p><iframe src="http://player.vimeo.com/video/33630092?title=0&amp;byline=0&amp;portrait=0" frameborder="0" width="500" height="400"></iframe></p>
<p><a href="http://www.virtu-al.net/2011/12/14/vm-start-up-script/">VM Start-up script</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.virtu-al.net/2011/12/14/vm-start-up-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>vCloud Director 1.0 PowerShell Advanced Functions</title>
		<link>http://www.virtu-al.net/2011/11/25/vcloud-director-1-0-powershell-advanced-functions/</link>
		<comments>http://www.virtu-al.net/2011/11/25/vcloud-director-1-0-powershell-advanced-functions/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 10:54:33 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[vCloud Director]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.virtu-al.net/?p=2345</guid>
		<description><![CDATA[Its no secret that VMware are working on vCloud Director (vCD) cmdlets, they recently surveyed the PowerShell and VMware community to make sure they had all the information needed to make this as much of a success as the vSphere PowerCLI cmdlets. But did you know you can already use PowerShell with vCD ?  It [...]<p><a href="http://www.virtu-al.net/2011/11/25/vcloud-director-1-0-powershell-advanced-functions/">vCloud Director 1.0 PowerShell Advanced Functions</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></description>
			<content:encoded><![CDATA[<p>Its no secret that VMware are working on vCloud Director (vCD) cmdlets, they recently <a href="http://www.virtu-al.net/2011/11/23/powercli-for-vcloud-directorhave-your-say/" target="_blank">surveyed the PowerShell and VMware community</a> to make sure they had all the information needed to make this as much of a success as the vSphere PowerCLI cmdlets.</p>
<p>But did you know you can already use PowerShell with vCD ?  It should be no surprise to anyone who uses PowerShell to know that PowerShell does a great job with XML manipulation and API calls.</p>
<p>As part of vCD 1.0 there was obviously an API, this was based on REST which is essentially calls to web pages and sending/receiving data, so with the knowledge that this API is available and that PowerShell is a great way to communicate with this API all that was left was for someone to tie all this together and create some advanced functions which can be used against the vCloud API…. enter Jake Robinson.</p>
<p><a href="http://virtu-al.net/images/vCloud-Director-1.0-Advanced-Functions_9413/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; float: right; padding-top: 0px; border-width: 0px;" title="image" src="http://virtu-al.net/images/vCloud-Director-1.0-Advanced-Functions_9413/image_thumb.png" alt="image" width="244" height="179" align="right" border="0" /></a></p>
<p>Jake has been doing some great work recently, personally I have spoken to him a couple of times and had the privilege of meeting him at VMworld 2011 Las Vegas, he is a great guy and very knowledgeable about both PowerShell and vCD so the perfect guy to create some advanced functions.</p>
<p>The functions can be downloaded from here:</p>
<p>Download: <a title="https://github.com/jakerobinson/vCloud-Powershell" href="https://github.com/jakerobinson/vCloud-Powershell">https://github.com/jakerobinson/vCloud-Powershell</a></p>
<p>I would also recommend checking out his great video on what he has created and some examples of how these can be used published <a href="http://geekafterfive.com/" target="_blank">here on his blog</a> (add to your RSS feed) and also embedded below.<span id="more-2345"></span></p>
<p><iframe style="width: 523px; height: 403px;" src="http://www.youtube.com/embed/6wfLBWS0krc" frameborder="0" width="420" height="315"></iframe></p>
<p>Overall I think these are a great start and something VMware should be looking very closely at when creating the cmdlets for vCD 1.5</p>
<p>Great job Jake !</p>
<p><a href="http://www.virtu-al.net/2011/11/25/vcloud-director-1-0-powershell-advanced-functions/">vCloud Director 1.0 PowerShell Advanced Functions</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.virtu-al.net/2011/11/25/vcloud-director-1-0-powershell-advanced-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PowerCLI for vCloud Director&#8211;Have your say !</title>
		<link>http://www.virtu-al.net/2011/11/23/powercli-for-vcloud-directorhave-your-say/</link>
		<comments>http://www.virtu-al.net/2011/11/23/powercli-for-vcloud-directorhave-your-say/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 11:34:28 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[vCloud Director]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[PowerCLI]]></category>

		<guid isPermaLink="false">http://www.virtu-al.net/?p=2340</guid>
		<description><![CDATA[VMware have recently announced a survey on the PowerCLI site, this has been setup to poll people for what they think would be the best way to introduce cmdlets for vCloud Director, personally I think it’s a great move and proves that VMware really does listen to their customers opinions. Their questions not only ask [...]<p><a href="http://www.virtu-al.net/2011/11/23/powercli-for-vcloud-directorhave-your-say/">PowerCLI for vCloud Director&ndash;Have your say !</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: normal;">VMware have recently announced a survey on the PowerCLI site, this has been setup t<a href="http://virtu-al.net/images/ee3774edbb5d_AE8C/image.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; float: right; padding-top: 0px; border-width: 0px;" title="image" src="http://virtu-al.net/images/ee3774edbb5d_AE8C/image_thumb.png" alt="image" width="240" height="240" align="right" border="0" /></a>o poll people for what they think would be the best way to introduce cmdlets for vCloud Director, personally I think it’s a great move and proves that VMware really does listen to their customers opinions.</span></p>
<p>Their questions not only ask how you would like the vCloud cmdlets distributed but also if you would prefer common objects like VMs and Users to be new cmdlets based towards vCloud director or to add these as additional parameters to the existing cmdlets.</p>
<p>Personally when answering these questions I have to remind myself of a few things and ask myself a few questions:</p>
<ul>
<li>vCloud Org users or tenants are going to be interested in different things than a vSphere admin, for example, does a tenant care about the details of the datastore so long as they are getting what they paid for, do they care about things like what host the VM or even what vCenter the VM is hosted in ? With this in mind do they really want to see the full set of “vSphere Properties” for an object or would a new set of properties based on the cloud information be relevant, similar with the cmdlets, do they want to see all the vSphere cmdlets or would a more specific set of cmdlets be better ?</li>
<li>Will vCloud Admins want to connect to both the vCloud and the vCenter at the same time ?  How will this work, when connected to both what would they expect to be displayed when running Get-VM? vSphere VMs, vCloud VMs both ? How would the properties be displayed ?</li>
<li>Will vCloud admins want to take a cloud VM and perform vSphere actions against the VM ?</li>
</ul>
<p><span id="more-2340"></span>These are just things which are in my mind, I&#8217;m sure vCloud admins and tenants will have many more to think about.</p>
<p>As part of the survey VMware have also teamed up with TrainSignal and are giving away some PowerCLI training, if you haven&#8217;t seen this before then it is definitely worth checking out.</p>
<p>So all you need to do is answer 4 simple questions.  Please select the option that best fits your desired user experience for each of the questions.</p>
<h4><a href="http://www.surveymonkey.com/s/powercli20111121" target="_blank">Fill in the 4 question survey here</a></h4>
<p>Any questions around this area can be posted in this community link, also if you want to explain further why you chose your answers or any thoughts at all please raise them here:  <a title="http://communities.vmware.com/thread/337330?tstart=0" href="http://communities.vmware.com/thread/337330?tstart=0">http://communities.vmware.com/thread/337330?tstart=0</a></p>
<p><a href="http://www.virtu-al.net/2011/11/23/powercli-for-vcloud-directorhave-your-say/">PowerCLI for vCloud Director&ndash;Have your say !</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.virtu-al.net/2011/11/23/powercli-for-vcloud-directorhave-your-say/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>vSphere Distributed Switch PowerCLI cmdlets</title>
		<link>http://www.virtu-al.net/2011/11/01/vsphere-distributed-switch-powercli-cmdlets/</link>
		<comments>http://www.virtu-al.net/2011/11/01/vsphere-distributed-switch-powercli-cmdlets/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 10:05:51 +0000</pubDate>
		<dc:creator>Alan</dc:creator>
				<category><![CDATA[VDS]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[PowerCLI]]></category>
		<category><![CDATA[PowerShell]]></category>

		<guid isPermaLink="false">http://www.virtu-al.net/?p=2324</guid>
		<description><![CDATA[For a long time now when presenting at VMworld or VMUGS I have asked the question – What would you like to see from PowerCLI next ?  The standard answer I get at most of these is vSphere Distributed Switch (VDS) cmdlets ! Luc Dekens did a great job with his series of posts showing [...]<p><a href="http://www.virtu-al.net/2011/11/01/vsphere-distributed-switch-powercli-cmdlets/">vSphere Distributed Switch PowerCLI cmdlets</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></description>
			<content:encoded><![CDATA[<p>For a long time now when presenting at VMworld or VMUGS I have asked the question – What would you like to see from PowerCLI next ?  The standard answer I get at most of these is vSphere Distributed Switch (VDS) cmdlets !</p>
<p>Luc Dekens did a great job with his <a href="http://www.lucd.info/2009/10/27/dvswitch-scripting-function-index/" target="_blank">series of posts showing how you could create your own VDS advanced functions</a>, these allow you to add the functions to your PowerCLI session and work with VDS, find them here and take a look, they are a great example of how you can expand PowerCLI to support areas not yet written.</p>
<p>So what&#8217;s new ?</p>
<p>VMware have now released some PowerCLI cmdlets as a fling which work with VDS and allow you to do most of the common VDS tasks in your vSphere environment.  Please note that this is a fling and therefore not officially supported by VMware.  Having said that we are definitely keen for you to download these and try them out – please make sure you leave feedback as this will help with future versions !</p>
<h2>Requirements</h2>
<p>Currently there are some strict requirements around these cmdlets:</p>
<ul>
<li>Windows required XP or Windows Server 2003 or 2008 is required  (Windows 7 and Vista are not supported currently)</li>
<li>VMware PowerCLI 4.1.1 or later is needed</li>
</ul>
<p><span id="more-2324"></span></p>
<h2>Getting started</h2>
<p>1.  Download the fling from here: <a title="http://labs.vmware.com/flings/vdspowercli" href="http://labs.vmware.com/flings/vdspowercli">http://labs.vmware.com/flings/vdspowercli</a></p>
<p>2.  Run the installer to install the cmdlets to your machine</p>
<p>3.  When you start PowerCLI run the following at the prompt to add the cmdlets into your session:</p>
<pre class="brush: powershell; title: ; notranslate">Add-PSSnapin VMware.VimAutomation.VdsComponent</pre>
<p>4. You can now list the cmdlets available to you for managing VDS by using the following:</p>
<pre class="brush: powershell; title: ; notranslate">Get-Command –Module VMware.VimAutomation.VdsComponent</pre>
<h2></h2>
<h2>What do you get ?</h2>
<p>The following is a list of the cmdlets and what they are used for:</p>
<table style="border-collapse: collapse;" width="100%" border="1" cellspacing="0" cellpadding="0">
<colgroup>
<col style="width: 171pt; mso-width-source: userset; mso-width-alt: 8338;" width="228" />
<col style="width: 637pt; mso-width-source: userset; mso-width-alt: 31049;" width="849" /></colgroup>
<tbody>
<tr style="height: 15pt;">
<td class="xl65" style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="192" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;"><strong>Name</strong></span></span></td>
<td class="xl65" style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;"><strong>Synopsis</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="195" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Add-VdsVMHost</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Add a host to be managed by a vSphere Distributed Switch.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="198" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Apply-VdsDVPortPolicyProfile</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Apply the DVPort policy profile to the specified<br />
DVPortgroup or DVPort.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="201" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Export-VdsDVPortgroupProfile</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Retrieve the configuration from specified DVPortgroup<br />
and exports that to a profile xml file.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="203" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Export-VdsDVPortPolicyProfile</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Retrieve the DVPort policy configuration from specified<br />
DVPortgroup or DVPort and exports<br />
that to a DVPort policy profile xml file.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="205" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Export-VdsProfile</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Retrieve the configuration from specified vSphere<br />
Distributed Switches and exports that to a profile xml file.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="207" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Get-Vds</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Retrieve the vSphere Distributed Switches associated<br />
with a virtual machine/host or in any location.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="209" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Get-VdsDistributedPortgroup</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Retrieve the available vSphere Distributed Port Groups<br />
of name, virtual machines,<br />
and vSphere Distributed Switches in the Location.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="211" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Get-VdsDVPort</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Retrieves the available DVPort on specified<br />
vSphere Distributed Switches or DVPortGroup.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="213" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Get-VdsDVPortBlockedPolicy</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Retrieve the Blocked policy of the specified<br />
DVPortgroup or DVPort.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="215" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Get-VdsDVPortgroupPolicy</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Retrieve the Override DVPortgroup policy of the<br />
specified DVPortgroup.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="216" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Get-VdsDVPortSecurityPolicy</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Retrieve the Security policy of the specified<br />
DVPortgroup or DVPort.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="217" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Get-VdsDVPortShapingPolicy</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Retrieve the Shaping policy of the specified<br />
DVPortgroup or DVPort.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="218" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Get-VdsDVPortTeamingPolicy</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Retrieve the Teaming policy of the specified<br />
DVPortgroup or DVPort.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="219" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Get-VdsVMHost</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Get the hosts managed by a vSphere Distributed Switch.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="220" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Move-VdsVMHostNetworkAdapter</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Move a host network adapter between VSS and VDS.<br />
Supports PhysicalNic and HostVirtualNic</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="221" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">New-Vds</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Create a new vSphere Distributed Switch in a specific location.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="222" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">New-VdsDistributedPortgroup</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Create a new vSphere Distributed Port Group in the specified VDS.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="223" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Remove-Vds</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Remove the specified vSphere Distributed Switches.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="224" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Remove-VdsDistributedPortgroup</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Remove the specified vSphere Distributed Port Groups.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="224" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Remove-VdsVMHost</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Remove a host from a vSphere Distributed Switch.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="224" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set-Vds</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Reconfigure the specified vSphere Distributed Switch.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="224" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set-VdsDistributedPortgroup</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Change the properties of the specified<br />
vSphere Distributed Port Group.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="224" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set-VdsDVPort</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Update the properties of specified DVPort.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="224" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set-VdsDVPortBlockedPolicy</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set the Blocked policy for the specified DVPortgroup or DVPort.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="224" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set-VdsDVPortgroupPolicy</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set the Blocked policy for the specified DVPortgroup or DVPort.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="224" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set-VdsDVPortSecurityPolicy</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set the Blocked policy for the specified DVPortgroup or DVPort.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="224" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set-VdsDVPortShapingPolicy</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set the Shaping policy for the specified DVPortgroup or DVPort.</span></span></td>
</tr>
<tr style="height: 15pt;">
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="224" height="20"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set-VdsDVPortTeamingPolicy</span></span></td>
<td style="padding-left: 1px; padding-right: 1px; vertical-align: bottom; padding-top: 1px;" width="739"><span style="font-family: Calibri;"><span style="font-size: 11pt; color: #000000;">Set the Shaping policy for the specified DVPortgroup or DVPort.</span></span></td>
</tr>
</tbody>
</table>
<h2></h2>
<h2>Examples</h2>
<pre class="brush: powershell; title: ; notranslate">#Get all VDS in &quot;test&quot; Datacente:
$testvdslist = Get-VDS -Location test

#Update VDS uplink ports number and MTU:
Set-VDS -Vds $vds -NumUplinkPorts 10 -Mtu 2000

#Create VDS with default settings:
New-VDS -Name newvds -Location test

#Remove VDS:
Remove-VDS $vds

#Add VMHost to VDS:
Add-VdsVMHost -VDS $vds -VMHost $vmhost1 -Confirm:$false

#Get all VMHost on specified VDS:
$vmhostlist = Get-VdsVMHost -VDS $vds

#Remove VMHost from VDS:
Remove-VDSVMHost -Vds $vds -VMHost $vmhostlist[1]

#Move VmkNic from Host to VDS:
Move-VdsVMHostNetworkAdapter -VirtualNic $nic -DVPortgroup $dvpg -Confirm:$false

#Get DVPortgroup with Name:
$dvpg = Get-VdsDistributedPortgroup -Name testdvportgroup

#Update DVPortgroup ports number:
Set-VdsDistributedPortgroup -DVPortgroup $dvpg -NumPorts 1000

#Create new DVPortgroup with referenceDVPortgroup:
New-VdsDistributedPortgroup -Name testdvpg1 -Vds $vds -ReferenceDVPortgroup $dvpg

#Remove DVPortgroup:
Get-VdsDistributedPortgroup -Name testdvportgroup | Remove-VdsDistributedPortgroup

#Export VDSProfile file from VDS:
Export-VdsProfile -FilePath ./vdsprofile1.xml -VDS $vds

#Export DVPortgroup Profile file from DVPortgroup:
Export-VdsDVPortgroupProfile -FilePath ./vdsdvpgprofile1.xml -DVPortgroup $dvpg

#Export VdsDVPortPolicyProfile file from DVPort:
Export-VdsDVPortPolicyProfile -FilePath ./dvportpolicyprofile1.xml -DVPort $dvport

#Apply the DVPort policy profile to the specified DVPortgroup:
Apply-VdsDVPortPolicyProfile -FilePath ./dvportpolicyprofile1.xml -DVPortGroup $dvpg

#Create new VDS from profile:
New-VDS -Name testvds -Location $testDC -Profile ./vdsprofile1.xml

#Retrieve the Blocked policy of the specified DVPortgroup:
$policy = Get-VdsDVPortBlockedPolicy -DVPortgroup $dvpg

#Retrieve the Security policy of the specified DVPortgroup:
$policy = Get-VdsDVPortSecurityPolicy -DVPortgroup $dvpg

#Retrieve the Shaping policy of the specified DVPortgroup:
$policy = Get-VdsDVPortShapingPolicy -DVPortgroup $dvpg

#Retrieve the Teaming policy of the specified DVPortgroup:
$policy = Get-VdsDVPortTeamingPolicy -DVPortgroup $dvpg

#Retrieve the DVPortgroup policy of the specified DVPortgroup:
$policy = Get-VdsDVPortgroupPolicy -DVPortgroup $dvpg

#Update the blocked policy for the specified DVPortgroup:
Set-VdsDVPortBlockedPolicy -DVPortgroup $dvpg -Blocked $false

#Update the security policy for the specified DVPort:
Set-VdsDVPortSecurityPolicy -DVPort $dvport -Inherited $false -AllowPromiscuousInherited $false -AllowPromiscuous $true -MacChangesInherited $false -MacChanges $true

#Update the shaping policy for the specified DVPortgroup:
Set-VdsDVPortShapingPolicy -DVPortgroup $dvpg -ShapingType $shapingTypeEnum::InShapingPolicy -BurstSize 1024000 -Enabled $true

#Update the teaming policy for the specified DVPortgroup:
Set-VdsDVPortTeamingPolicy -DVPortgroup $dvpg -LoadBalance &quot;loadbalance_srcid&quot; -NotifySwitches $false -FailBack $true -FailOverDetection &quot;Link status only&quot; -ActiveUplink dvUplink1,dvUplink2 -StandbyUplink dvUplink3,dvUplink4

#Update the DVPortgroup policy for the specified DVPortgroup:
Set-VdsDVPortgroupPolicy -DVPortgroup $dvpg -BlockOverrideAllowed $true -ShapingOverrideAllowed $true
Get DVPort with key and VDS parameters:

$dvport = Get-VdsDVPort -VDS $vds -Key 100

#Update DVPort Name and description:
Set-VdsDVPort -DVPort $dvport -Name &quot;testdvport&quot; -Description &quot;testDVPortDescription&quot;
</pre>
<p><a href="http://www.virtu-al.net/2011/11/01/vsphere-distributed-switch-powercli-cmdlets/">vSphere Distributed Switch PowerCLI cmdlets</a> is a post from: <a href="http://www.virtu-al.net">Virtu-Al</a>.<br>
Virtu-Al is one of the authors of VMware vSphere PowerCLI Reference: Automating vSphere Administration" <br><br>Buy it now from:
<a href="http://www.amazon.com/gp/product/0470890797?ie=UTF8&tag=virtal-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0470890797" target="_blank">Amazon USA</a>
<a href="https://www.amazon.co.uk/dp/0470890797?tag=virtal-21&camp=1406&creative=6394&linkCode=as1&creativeASIN=0470890797&adid=11S7HEXGGN3JB7HNME6M&" target="_blank">Amazon UK
</a><a href="http://www.sybex.com/WileyCDA/SybexTitle/VMware-vSphere-PowerCLI-Reference-Automating-vSphere-Administration.productCd-0470890797.html" target="_blank">Sybex</a>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.virtu-al.net/2011/11/01/vsphere-distributed-switch-powercli-cmdlets/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

