<?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: vSphere permissions: export &amp; import &#8211; Part 1</title>
	<atom:link href="http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/</link>
	<description>Virtually everything is poshable</description>
	<lastBuildDate>Mon, 06 Sep 2010 08:53:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: vCenter Roles &#38; Permissions Export / Import scripts - Virtually Prepared</title>
		<link>http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/comment-page-1/#comment-2576</link>
		<dc:creator>vCenter Roles &#38; Permissions Export / Import scripts - Virtually Prepared</dc:creator>
		<pubDate>Thu, 19 Aug 2010 13:18:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=662#comment-2576</guid>
		<description>[...] After sifting through my pile of scripts I took to the web and headed straight for Alan Renouf&#8217;s website http://www.virtu-al.net/ . As you would expect there was an example originally instigated from a community discussion, the exact page is here, http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/ [...]</description>
		<content:encoded><![CDATA[<p>[...] After sifting through my pile of scripts I took to the web and headed straight for Alan Renouf&#8217;s website <a href="http://www.virtu-al.net/" rel="nofollow">http://www.virtu-al.net/</a> . As you would expect there was an example originally instigated from a community discussion, the exact page is here, <a href="http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/" rel="nofollow">http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/comment-page-1/#comment-2340</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 14 May 2010 15:51:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=662#comment-2340</guid>
		<description>I&#039;m getting the same form of errors as other users. 

The script runs okay, but I get continual errors along the lines of:

&quot;You cannot call a method on a null-valued expression.
At C:\tmp\ExportRoles.ps1:85 char:22
$node.AppendChild( &lt;&lt;&lt;&lt; $tmp)&quot;

&quot;You cannot call a method on a null-valued expression.
At C:\tmp\ExportRoles.ps1:85 char:23
$node.SetAttribute( &lt;&lt;&lt;&lt; $name, $value)&quot;

&quot;You cannot call a method on a null-valued expression.
At C:\tmp\ExportRoles.ps1:85 char:44
$tmp = $global:vInventory.CreateElement( &lt;&lt;&lt;&lt; $nodeName)&quot;

That loops for a while then I get errors like:

&quot;Exception calling &quot;AppendChild&quot; with &quot;1&quot; argument(s): &quot;Object reference not set to an instance of an object.&quot;
At C:\tmp\ExportRoles.ps1:81 char:22
$node.AppendChild( &lt;&lt;&lt;&lt; $tmp)

When carrying out the fix as mentioned by Mitchum, i get the same erros but with a new one thrown in:

&quot;Exception calling &quot;CreateElement&quot; with &quot;1&quot; argument(s): &quot;The local name for elements or attributes cannot be null or an empty string.&quot;
At C:\tmp\ExportRoles.ps1:80 char:37
$tmp = $vInventory.CreateElement( &lt;&lt;&lt;&lt; $nodeName)

The script is creating the xml file populated with the descriptors, it&#039;s just not populating it with any of my roles or permissions.

I&#039;m using vCenter 4.0U1 build 208111 and the PowerCli 4.0.1-208462

Any ideas?

&quot;Exception calling &quot;CreateElement&quot; with &quot;1&quot;</description>
		<content:encoded><![CDATA[<p>I&#8217;m getting the same form of errors as other users. </p>
<p>The script runs okay, but I get continual errors along the lines of:</p>
<p>&#8220;You cannot call a method on a null-valued expression.<br />
At C:\tmp\ExportRoles.ps1:85 char:22<br />
$node.AppendChild( <<<< $tmp)&#8221;</p>
<p>&#8220;You cannot call a method on a null-valued expression.<br />
At C:\tmp\ExportRoles.ps1:85 char:23<br />
$node.SetAttribute( <<<< $name, $value)&#8221;</p>
<p>&#8220;You cannot call a method on a null-valued expression.<br />
At C:\tmp\ExportRoles.ps1:85 char:44<br />
$tmp = $global:vInventory.CreateElement( <<<< $nodeName)&#8221;</p>
<p>That loops for a while then I get errors like:</p>
<p>&#8220;Exception calling &#8220;AppendChild&#8221; with &#8220;1&#8243; argument(s): &#8220;Object reference not set to an instance of an object.&#8221;<br />
At C:\tmp\ExportRoles.ps1:81 char:22<br />
$node.AppendChild( <<<< $tmp)</p>
<p>When carrying out the fix as mentioned by Mitchum, i get the same erros but with a new one thrown in:</p>
<p>&#8220;Exception calling &#8220;CreateElement&#8221; with &#8220;1&#8243; argument(s): &#8220;The local name for elements or attributes cannot be null or an empty string.&#8221;<br />
At C:\tmp\ExportRoles.ps1:80 char:37<br />
$tmp = $vInventory.CreateElement( <<<< $nodeName)</p>
<p>The script is creating the xml file populated with the descriptors, it&#8217;s just not populating it with any of my roles or permissions.</p>
<p>I&#8217;m using vCenter 4.0U1 build 208111 and the PowerCli 4.0.1-208462</p>
<p>Any ideas?</p>
<p>&#8220;Exception calling &#8220;CreateElement&#8221; with &#8220;1&#8243;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bkboyer</title>
		<link>http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/comment-page-1/#comment-2277</link>
		<dc:creator>bkboyer</dc:creator>
		<pubDate>Fri, 30 Apr 2010 15:10:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=662#comment-2277</guid>
		<description>Here&#039;s the only part I changed to get it to work, as mentioned by Mitchum:

-------
function Get-XmlNode{
  param($path)
   $vInventory.SelectNodes($path)
}
[XML]$vInventory = “”
# Roles
---------</description>
		<content:encoded><![CDATA[<p>Here&#8217;s the only part I changed to get it to work, as mentioned by Mitchum:</p>
<p>&#8212;&#8212;-<br />
function Get-XmlNode{<br />
  param($path)<br />
   $vInventory.SelectNodes($path)<br />
}<br />
[XML]$vInventory = “”<br />
# Roles<br />
&#8212;&#8212;&#8212;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jase</title>
		<link>http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/comment-page-1/#comment-2260</link>
		<dc:creator>Jase</dc:creator>
		<pubDate>Tue, 27 Apr 2010 19:44:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=662#comment-2260</guid>
		<description>Is there an update version of the script that works? I too am getting the same result as everyone else..
You cannot call a method on a null-valued expression.
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:58 char:21
+ $node.SetAttribute &lt;&lt;&lt;&lt; ($name, $value)


Guess I just need to learn how to script.. :)

Thanks!</description>
		<content:encoded><![CDATA[<p>Is there an update version of the script that works? I too am getting the same result as everyone else..<br />
You cannot call a method on a null-valued expression.<br />
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:58 char:21<br />
+ $node.SetAttribute &lt;&lt;&lt;&lt; ($name, $value)</p>
<p>Guess I just need to learn how to script.. <img src='http://www.virtu-al.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jase</title>
		<link>http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/comment-page-1/#comment-2259</link>
		<dc:creator>Jase</dc:creator>
		<pubDate>Tue, 27 Apr 2010 18:38:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=662#comment-2259</guid>
		<description>Can someone post the new modified script? I&#039;m getting the same error as everyone else. It looks like Mitchum posted a fix:
**************************
There are 2 things to have the script working:
- Remove the global type for vInventory variable
- Define the vInventory variable to be a XML object:
[XML] $vInventory = “”

Should be ok then  
**************************
Can someone correct that and re-post?
Thanks for the help VMware peeps!!</description>
		<content:encoded><![CDATA[<p>Can someone post the new modified script? I&#8217;m getting the same error as everyone else. It looks like Mitchum posted a fix:<br />
**************************<br />
There are 2 things to have the script working:<br />
- Remove the global type for vInventory variable<br />
- Define the vInventory variable to be a XML object:<br />
[XML] $vInventory = “”</p>
<p>Should be ok then<br />
**************************<br />
Can someone correct that and re-post?<br />
Thanks for the help VMware peeps!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene</title>
		<link>http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/comment-page-1/#comment-2217</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Fri, 16 Apr 2010 01:27:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=662#comment-2217</guid>
		<description>Thanks a lot. Have been looking for something like this for our environment.</description>
		<content:encoded><![CDATA[<p>Thanks a lot. Have been looking for something like this for our environment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bkboyer</title>
		<link>http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/comment-page-1/#comment-1947</link>
		<dc:creator>bkboyer</dc:creator>
		<pubDate>Wed, 10 Mar 2010 20:18:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=662#comment-1947</guid>
		<description>Thanks, Al, for another great script.  And thanks Mitchum, that fix worked great.

One quick question from a newbie, is there any particular application, other than IE, that works well for viewing XML docs?  Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks, Al, for another great script.  And thanks Mitchum, that fix worked great.</p>
<p>One quick question from a newbie, is there any particular application, other than IE, that works well for viewing XML docs?  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/comment-page-1/#comment-1945</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 09 Mar 2010 19:20:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=662#comment-1945</guid>
		<description>i am running the script with this command - .\EXPORT_vc_roles.ps1 --server vcservername --username username --password &quot;*****&quot;

and I too get numerous errors regarding calling a method on a null-valued expression.

just a sample of the numerous errors.


You cannot call a method on a null-valued expression.
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:58 char:21
+   $node.SetAttribute &lt;&lt;&lt;&lt; ($name, $value)
    + CategoryInfo          : InvalidOperation: (SetAttribute:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:58 char:21
+   $node.SetAttribute &lt;&lt;&lt;&lt; ($name, $value)
    + CategoryInfo          : InvalidOperation: (SetAttribute:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:58 char:21
+   $node.SetAttribute &lt;&lt;&lt;&lt; ($name, $value)
    + CategoryInfo          : InvalidOperation: (SetAttribute:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:58 char:21
+   $node.SetAttribute &lt;&lt;&lt;&lt; ($name, $value)
    + CategoryInfo          : InvalidOperation: (SetAttribute:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Method invocation failed because [System.String] doesn&#039;t contain a method named &#039;Save&#039;.
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:88 char:17
+ $vInventory.Save &lt;&lt;&lt;&lt; (&quot;S:\SCRIPTS\vInventory.xml&quot;)
    + CategoryInfo          : InvalidOperation: (Save:String) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound</description>
		<content:encoded><![CDATA[<p>i am running the script with this command &#8211; .\EXPORT_vc_roles.ps1 &#8211;server vcservername &#8211;username username &#8211;password &#8220;*****&#8221;</p>
<p>and I too get numerous errors regarding calling a method on a null-valued expression.</p>
<p>just a sample of the numerous errors.</p>
<p>You cannot call a method on a null-valued expression.<br />
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:58 char:21<br />
+   $node.SetAttribute &lt;&lt;&lt;&lt; ($name, $value)<br />
    + CategoryInfo          : InvalidOperation: (SetAttribute:String) [], RuntimeException<br />
    + FullyQualifiedErrorId : InvokeMethodOnNull</p>
<p>You cannot call a method on a null-valued expression.<br />
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:58 char:21<br />
+   $node.SetAttribute &lt;&lt;&lt;&lt; ($name, $value)<br />
    + CategoryInfo          : InvalidOperation: (SetAttribute:String) [], RuntimeException<br />
    + FullyQualifiedErrorId : InvokeMethodOnNull</p>
<p>You cannot call a method on a null-valued expression.<br />
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:58 char:21<br />
+   $node.SetAttribute &lt;&lt;&lt;&lt; ($name, $value)<br />
    + CategoryInfo          : InvalidOperation: (SetAttribute:String) [], RuntimeException<br />
    + FullyQualifiedErrorId : InvokeMethodOnNull</p>
<p>You cannot call a method on a null-valued expression.<br />
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:58 char:21<br />
+   $node.SetAttribute &lt;&lt;&lt;&lt; ($name, $value)<br />
    + CategoryInfo          : InvalidOperation: (SetAttribute:String) [], RuntimeException<br />
    + FullyQualifiedErrorId : InvokeMethodOnNull</p>
<p>Method invocation failed because [System.String] doesn&#039;t contain a method named &#039;Save&#039;.<br />
At S:\SCRIPTS\FID_EXPORT_vc_roles.ps1:88 char:17<br />
+ $vInventory.Save &lt;&lt;&lt;&lt; (&quot;S:\SCRIPTS\vInventory.xml&quot;)<br />
    + CategoryInfo          : InvalidOperation: (Save:String) [], RuntimeException<br />
    + FullyQualifiedErrorId : MethodNotFound</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mitchum</title>
		<link>http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/comment-page-1/#comment-1767</link>
		<dc:creator>Mitchum</dc:creator>
		<pubDate>Thu, 28 Jan 2010 08:21:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=662#comment-1767</guid>
		<description>There are 2 things to have the script working:
- Remove the global type for vInventory variable
- Define the vInventory variable to be a XML object:
[XML] $vInventory = “”

Should be ok then ;-)</description>
		<content:encoded><![CDATA[<p>There are 2 things to have the script working:<br />
- Remove the global type for vInventory variable<br />
- Define the vInventory variable to be a XML object:<br />
[XML] $vInventory = “”</p>
<p>Should be ok then <img src='http://www.virtu-al.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kl</title>
		<link>http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/comment-page-1/#comment-1308</link>
		<dc:creator>kl</dc:creator>
		<pubDate>Tue, 03 Nov 2009 15:15:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtu-al.net/?p=662#comment-1308</guid>
		<description>Sie können keine Methode für einen Ausdruck mit dem Wert NULL aufrufen.
Bei D:\permissions\roles.ps1:54 Zeichen:20
+   $node.AppendChild &lt;&lt;&lt;&lt; ($tmp)
    + CategoryInfo          : InvalidOperation: (AppendChild:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

I had the same problem. I fixed it by replacing the $global: variables by normal one.

$vInventory.SelectNodes($path) instead of  $global:vInventory.SelectNodes($path)

And this with all global variables.</description>
		<content:encoded><![CDATA[<p>Sie können keine Methode für einen Ausdruck mit dem Wert NULL aufrufen.<br />
Bei D:\permissions\roles.ps1:54 Zeichen:20<br />
+   $node.AppendChild &lt;&lt;&lt;&lt; ($tmp)<br />
    + CategoryInfo          : InvalidOperation: (AppendChild:String) [], RuntimeException<br />
    + FullyQualifiedErrorId : InvokeMethodOnNull</p>
<p>I had the same problem. I fixed it by replacing the $global: variables by normal one.</p>
<p>$vInventory.SelectNodes($path) instead of  $global:vInventory.SelectNodes($path)</p>
<p>And this with all global variables.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
