<?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>It&#039;s Just Another Layer &#187; Get-VM</title>
	<atom:link href="http://itsjustanotherlayer.com/tag/get-vm/feed/" rel="self" type="application/rss+xml" />
	<link>http://itsjustanotherlayer.com</link>
	<description>Virtualization is a layer in software. What are you abstracting away from?</description>
	<lastBuildDate>Fri, 30 Jul 2010 16:38:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Powershell speed &#8211; Get-VM vs. Get-Type -ViewType</title>
		<link>http://itsjustanotherlayer.com/2008/12/powershell-speed-get-vm-vs-get-type-viewtype/</link>
		<comments>http://itsjustanotherlayer.com/2008/12/powershell-speed-get-vm-vs-get-type-viewtype/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 18:06:15 +0000</pubDate>
		<dc:creator>iguy</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[Get-View]]></category>
		<category><![CDATA[Get-VM]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[VI Toolkit]]></category>

		<guid isPermaLink="false">http://itsjustanotherlayer.com/?p=47</guid>
		<description><![CDATA[I&#8217;ve been starting to look at using the VI Toolkit which uses Powershell.   In doing this many of the command formats tend to be &#8220;Get-VM &#124; Get-View&#8221; or &#8220;Get-VMHost &#124; Get-View&#8220;.   So I&#8217;m off and figuring this out and I run a small script and say &#8220;Geez that took a long time to run&#8221;.   I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been starting to look at using the VI Toolkit which uses Powershell.   In doing this many of the command formats tend to be &#8220;<em>Get-VM | Get-View</em>&#8221; or &#8220;<em>Get-VMHost | Get-View</em>&#8220;.   So I&#8217;m off and figuring this out and I run a small script and say &#8220;Geez that took a long time to run&#8221;.   I&#8217;m talking to my co-worker (a pretty smart cookie) and he says &#8220;Why don&#8217;t you just use &#8220;<em>Get-View -ViewType VirtualMachine</em>&#8221; and skip the middle man?&#8221;   Good point.  Didn&#8217;t know about that command.  Well this is just a tad bit faster.</p>
<p style="padding-left: 30px;"><em>Get-VM | Get-View </em>timing in my script takes <strong>1 minute and 37 seconds</strong>.</p>
<p style="padding-left: 30px;"><em>Get-View -ViewType VirtualMachine </em>takes an amazing <span style="text-decoration: underline;"><strong>5.12 seconds</strong></span>.</p>
<p>The VI Toolkit developers have identified this as a serious issue are working on ways to speed this up and retain backwards compatibility.</p>
<p>So the lesson today is if you need to do a Get-View immediately after doing some set collection look at using the <em>Get-View -ViewType </em>instead.  It isn&#8217;t as readable though it gets the job done well.</p>
]]></content:encoded>
			<wfw:commentRss>http://itsjustanotherlayer.com/2008/12/powershell-speed-get-vm-vs-get-type-viewtype/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
