<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: PowerCLI on steroids &#8211; Custom attributes</title>
	<atom:link href="http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/</link>
	<description>Virtually everything is poshable</description>
	<lastBuildDate>Sat, 11 Feb 2012 14:14:23 +0000</lastBuildDate>
	<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>By: Vladimir</title>
		<link>http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/#comment-5685</link>
		<dc:creator>Vladimir</dc:creator>
		<pubDate>Fri, 25 Mar 2011 18:36:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=575#comment-5685</guid>
		<description>Luc, thank you for reply.
Actually I was somewhat confused by the date of the post, so I decided to ask.</description>
		<content:encoded><![CDATA[<p>Luc, thank you for reply.<br />
Actually I was somewhat confused by the date of the post, so I decided to ask.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LucD</title>
		<link>http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/#comment-5681</link>
		<dc:creator>LucD</dc:creator>
		<pubDate>Fri, 25 Mar 2011 17:57:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=575#comment-5681</guid>
		<description>Vladimir, this post, which I did as a guest blogger on Alan&#039;s blog btw, is quite old.
No, the current cmdlets are much improved regarding execution speed.
You still might notice a better speed when you the SDK methods, but the difference will not be that dramatic anymore.</description>
		<content:encoded><![CDATA[<p>Vladimir, this post, which I did as a guest blogger on Alan&#8217;s blog btw, is quite old.<br />
No, the current cmdlets are much improved regarding execution speed.<br />
You still might notice a better speed when you the SDK methods, but the difference will not be that dramatic anymore.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vladimir</title>
		<link>http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/#comment-5677</link>
		<dc:creator>Vladimir</dc:creator>
		<pubDate>Fri, 25 Mar 2011 15:55:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=575#comment-5677</guid>
		<description>Hi Alan,

Thank you for scripts and explanations.
Just one question. Do current version have the same performance problems on some cmdlets as it was with previous ones?
Do I have to use the same technique you mentioned in this topic in nowadays?

Thank you</description>
		<content:encoded><![CDATA[<p>Hi Alan,</p>
<p>Thank you for scripts and explanations.<br />
Just one question. Do current version have the same performance problems on some cmdlets as it was with previous ones?<br />
Do I have to use the same technique you mentioned in this topic in nowadays?</p>
<p>Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clone-to-test: Part 2</title>
		<link>http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/#comment-3527</link>
		<dc:creator>Clone-to-test: Part 2</dc:creator>
		<pubDate>Wed, 01 Dec 2010 07:29:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=575#comment-3527</guid>
		<description>[...] thanks to LucD for his post, Maish for his vCenter Migration Script and Alan for his writeup on scripting custom attributes, all were most helpful and I doubt I could&#8217;ve figured it all out without their help. # Name : [...]</description>
		<content:encoded><![CDATA[<p>[...] thanks to LucD for his post, Maish for his vCenter Migration Script and Alan for his writeup on scripting custom attributes, all were most helpful and I doubt I could&#8217;ve figured it all out without their help. # Name : [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn</title>
		<link>http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/#comment-1913</link>
		<dc:creator>Glenn</dc:creator>
		<pubDate>Wed, 03 Mar 2010 06:02:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=575#comment-1913</guid>
		<description>Hi Alan,

Many thanks for putting in the time to work this out. It is exactly what I was looking for. I have tested this and it works for me, however I have a scenario where custom fields were entered as &quot;Global&quot; instead of &quot;Virtual Machine&quot;. In this instance the fields returned are only VmName and CAValue. CAName is blank. I don&#039;t have the PowerCLI/Powershell skills to work out what is wrong. Any ideas..?

Cheers

Glenn</description>
		<content:encoded><![CDATA[<p>Hi Alan,</p>
<p>Many thanks for putting in the time to work this out. It is exactly what I was looking for. I have tested this and it works for me, however I have a scenario where custom fields were entered as &#8220;Global&#8221; instead of &#8220;Virtual Machine&#8221;. In this instance the fields returned are only VmName and CAValue. CAName is blank. I don&#8217;t have the PowerCLI/Powershell skills to work out what is wrong. Any ideas..?</p>
<p>Cheers</p>
<p>Glenn</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uxmax</title>
		<link>http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/#comment-910</link>
		<dc:creator>uxmax</dc:creator>
		<pubDate>Wed, 02 Sep 2009 15:27:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=575#comment-910</guid>
		<description>Hello Alan,

again thank you for your reply:

i think there is still something wrong, i just added the lines but get the same error:

[vSphere PowerCLI] C:\Scripts&gt; .\export_cf.ps1

Name                       Port                       User
----                       ----                       ----
vcserverold                     443                        vcadmin
You cannot call a method on a null-valued expression.
At C:\Scripts\export_cf.ps1:5 char:23
+ $vmArray.GetEnumerator( &lt;&lt;&lt;&lt; ) &#124; %{</description>
		<content:encoded><![CDATA[<p>Hello Alan,</p>
<p>again thank you for your reply:</p>
<p>i think there is still something wrong, i just added the lines but get the same error:</p>
<p>[vSphere PowerCLI] C:\Scripts&gt; .\export_cf.ps1</p>
<p>Name                       Port                       User<br />
&#8212;-                       &#8212;-                       &#8212;-<br />
vcserverold                     443                        vcadmin<br />
You cannot call a method on a null-valued expression.<br />
At C:\Scripts\export_cf.ps1:5 char:23<br />
+ $vmArray.GetEnumerator( &lt;&lt;&lt;&lt; ) | %{</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uxmax</title>
		<link>http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/#comment-909</link>
		<dc:creator>uxmax</dc:creator>
		<pubDate>Wed, 02 Sep 2009 13:24:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=575#comment-909</guid>
		<description>Hello Alan,

i need to move my vcenter (or all esx hosts) to my new vsphere vcenter. I just connect 3.5 esx hosts to my new vcenter.
regarding to this nice guide iam able to move custom fields from old vcenter to my vsphere vcenter using export-csv.


http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/


-----snip---------snip---------snip---------snip----


1.Export all custom attributes to a CSV file (backup)
$list = @()
$vmArray.GetEnumerator() &#124; %{
$vmName = $_.Name
$_.Value.Custom.getenumerator() &#124; %{
$row = New-Object psobject
$row &#124; Add-Member -memberType noteproperty -name VmName -value $vmName
$row &#124; Add-Member -memberType noteproperty -name CAName -value $customKeyLookuphttp://$_.Name
$row &#124; Add-Member -memberType noteproperty -name CAValue -value $_.Value
$list += $row
}
}
$list &#124; Export-Csv &quot;C:\CA-backup.csv&quot; -noTypeInformation
-----snip---------snip---------snip---------snip---------snip----

so i connect vi PowerCli to my old vcenter &quot;connect-viserver&quot; and export all CF, &quot;reconnect&quot; all 3.5 esx server to my vsphere vcenter, connect to my new vcenter and import them accordingly:

-----snip---------snip---------snip---------snip---------snip----
# Import all custom attributes from a CSV file (restore)
Import-Csv &quot;C:\CA-backup.csv&quot; &#124; %{
$vmArrayhttp://$_.VmName.Object.setCustomValue($_.CAName,$_.CAValue)
}
-----snip---------snip---------snip---------snip---------snip----


I can&#039;t run this code snippets as a script itself and my PS Skills are limited so here is my Question: Could someone help me to get started ? 
I guess i need to connect to my vcenter first.. like &quot;Connect-VIServer vcserver&quot;

your help is much appreciated. thank you
rgrds uxmax

EDIT: so i just add the connection lines in the appropriate (export/import) code &quot;snippets&quot; ? 

Great Site btw :)</description>
		<content:encoded><![CDATA[<p>Hello Alan,</p>
<p>i need to move my vcenter (or all esx hosts) to my new vsphere vcenter. I just connect 3.5 esx hosts to my new vcenter.<br />
regarding to this nice guide iam able to move custom fields from old vcenter to my vsphere vcenter using export-csv.</p>
<p><a href="http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/" rel="nofollow">http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/</a></p>
<p>&#8212;&#8211;snip&#8212;&#8212;&#8212;snip&#8212;&#8212;&#8212;snip&#8212;&#8212;&#8212;snip&#8212;-</p>
<p>1.Export all custom attributes to a CSV file (backup)<br />
$list = @()<br />
$vmArray.GetEnumerator() | %{<br />
$vmName = $_.Name<br />
$_.Value.Custom.getenumerator() | %{<br />
$row = New-Object psobject<br />
$row | Add-Member -memberType noteproperty -name VmName -value $vmName<br />
$row | Add-Member -memberType noteproperty -name CAName -value $customKeyLookuphttp://$_.Name<br />
$row | Add-Member -memberType noteproperty -name CAValue -value $_.Value<br />
$list += $row<br />
}<br />
}<br />
$list | Export-Csv &#8220;C:\CA-backup.csv&#8221; -noTypeInformation<br />
&#8212;&#8211;snip&#8212;&#8212;&#8212;snip&#8212;&#8212;&#8212;snip&#8212;&#8212;&#8212;snip&#8212;&#8212;&#8212;snip&#8212;-</p>
<p>so i connect vi PowerCli to my old vcenter &#8220;connect-viserver&#8221; and export all CF, &#8220;reconnect&#8221; all 3.5 esx server to my vsphere vcenter, connect to my new vcenter and import them accordingly:</p>
<p>&#8212;&#8211;snip&#8212;&#8212;&#8212;snip&#8212;&#8212;&#8212;snip&#8212;&#8212;&#8212;snip&#8212;&#8212;&#8212;snip&#8212;-<br />
# Import all custom attributes from a CSV file (restore)<br />
Import-Csv &#8220;C:\CA-backup.csv&#8221; | %{<br />
$vmArrayhttp://$_.VmName.Object.setCustomValue($_.CAName,$_.CAValue)<br />
}<br />
&#8212;&#8211;snip&#8212;&#8212;&#8212;snip&#8212;&#8212;&#8212;snip&#8212;&#8212;&#8212;snip&#8212;&#8212;&#8212;snip&#8212;-</p>
<p>I can&#8217;t run this code snippets as a script itself and my PS Skills are limited so here is my Question: Could someone help me to get started ?<br />
I guess i need to connect to my vcenter first.. like &#8220;Connect-VIServer vcserver&#8221;</p>
<p>your help is much appreciated. thank you<br />
rgrds uxmax</p>
<p>EDIT: so i just add the connection lines in the appropriate (export/import) code &#8220;snippets&#8221; ? </p>
<p>Great Site btw <img src='http://www.virtu-al.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PowerCLI: Set Custom Fields &#171; ICT-Freak.nl</title>
		<link>http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/#comment-791</link>
		<dc:creator>PowerCLI: Set Custom Fields &#171; ICT-Freak.nl</dc:creator>
		<pubDate>Mon, 17 Aug 2009 08:13:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=575#comment-791</guid>
		<description>[...] This one-liner will run very slow on a Large environment. So if you have large environment you should definitely check out LucD post on Alan Renouf’s Blog:&#160; http://www.virtu-al.net [...]</description>
		<content:encoded><![CDATA[<p>[...] This one-liner will run very slow on a Large environment. So if you have large environment you should definitely check out LucD post on Alan Renouf’s Blog:&#160; <a href="http://www.virtu-al.net" rel="nofollow">http://www.virtu-al.net</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Setting custom attributes with VMware PowerCLI &#124; Arnim van Lieshout</title>
		<link>http://www.virtu-al.net/2009/05/29/powercli-on-steroids-custom-attributes/#comment-444</link>
		<dc:creator>Setting custom attributes with VMware PowerCLI &#124; Arnim van Lieshout</dc:creator>
		<pubDate>Tue, 02 Jun 2009 12:30:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=575#comment-444</guid>
		<description>[...] If you are interested in changing custom attributes in PowerCLI, you definitely MUST read Luc&#8217;s post PowerCLI on steroids - Custom attributes [...]</description>
		<content:encoded><![CDATA[<p>[...] If you are interested in changing custom attributes in PowerCLI, you definitely MUST read Luc&#8217;s post PowerCLI on steroids &#8211; Custom attributes [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

