<?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: dvSwitch scripting – Part 2 – dvPortgroup	</title>
	<atom:link href="https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/</link>
	<description>My PowerShell ramblings</description>
	<lastBuildDate>Wed, 24 Sep 2014 17:30:09 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/><atom:link rel="hub" href="https://websubhub.com/hub"/>	<item>
		<title>
		By: Raymundo Escobar		</title>
		<link>https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-3327</link>

		<dc:creator><![CDATA[Raymundo Escobar]]></dc:creator>
		<pubDate>Wed, 24 Sep 2014 17:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=515#comment-3327</guid>

					<description><![CDATA[Hi LUC, this save me the ass and I have to post a BIG thanks!!!]]></description>
			<content:encoded><![CDATA[<p>Hi LUC, this save me the ass and I have to post a BIG thanks!!!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-3032</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Mon, 31 Mar 2014 19:37:45 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=515#comment-3032</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-3031&quot;&gt;Andre&lt;/a&gt;.

Hi Andre,
I&#039;m not sure how you called the function, but when I use single quotes and named parameters, it seems to work for me.
See this short, abstract example
&lt;code&gt;
function Test-Function{
  param([parameter(Position = 0, Mandatory = $true)][string]$DatacenterName,
  [parameter(Position = 1, Mandatory = $true)][string]$dvSwitchName)
 
 	Get-Datacenter -Name $DatacenterName
}

$dcName = &#039;DC 1&#039;
Test-Function -DatacenterName $dcName -dvSwitchName &#039;dvSw1&#039;
&lt;/code&gt;]]></description>
			<content:encoded><![CDATA[<p>Hi Andre,<br />
I&#8217;m not sure how you called the function, but when I use single quotes and named parameters, it seems to work for me.<br />
See this short, abstract example<br />
<code><br />
function Test-Function{<br />
  param([parameter(Position = 0, Mandatory = $true)][string]$DatacenterName,<br />
  [parameter(Position = 1, Mandatory = $true)][string]$dvSwitchName)</p>
<p> 	Get-Datacenter -Name $DatacenterName<br />
}</p>
<p>$dcName = 'DC 1'<br />
Test-Function -DatacenterName $dcName -dvSwitchName 'dvSw1'<br />
</code></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andre		</title>
		<link>https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-3031</link>

		<dc:creator><![CDATA[Andre]]></dc:creator>
		<pubDate>Mon, 31 Mar 2014 17:56:18 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=515#comment-3031</guid>

					<description><![CDATA[Thank as as always for your excellent work. I&#039;ve been experimenting with your code in my LAB and I get a Null error when executing

 $dvSw.Portgroup &#124; %{Get-View -Id $_} 

I tracked it down and found out when I enter Datacenters that have spaces in them that is when the error occurs. How do I deal with Datacenters that have spaces in them?
	

$DatacenterName = &quot;DataCenter 1&quot;
$OlddvSwitch = &quot;DVS-Net1&quot;

function Get-dvSwitch{

	param([parameter(Position = 0, Mandatory = $true)][string]$DatacenterName,
	[parameter(Position = 1, Mandatory = $true)][string]$dvSwitchName)]]></description>
			<content:encoded><![CDATA[<p>Thank as as always for your excellent work. I&#8217;ve been experimenting with your code in my LAB and I get a Null error when executing</p>
<p> $dvSw.Portgroup | %{Get-View -Id $_} </p>
<p>I tracked it down and found out when I enter Datacenters that have spaces in them that is when the error occurs. How do I deal with Datacenters that have spaces in them?</p>
<p>$DatacenterName = &#8220;DataCenter 1&#8221;<br />
$OlddvSwitch = &#8220;DVS-Net1&#8221;</p>
<p>function Get-dvSwitch{</p>
<p>	param([parameter(Position = 0, Mandatory = $true)][string]$DatacenterName,<br />
	[parameter(Position = 1, Mandatory = $true)][string]$dvSwitchName)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-1379</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Thu, 29 Dec 2011 10:20:33 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=515#comment-1379</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-1378&quot;&gt;aihx&lt;/a&gt;.

@aihx, I see.
I&#039;m afraid I don&#039;t know how to talk to vSphere through raw SOAP packages.
Perhaps you could raise your question in the &lt;a href=&quot;https://communities.vmware.com/community/vmtn/developer&quot; rel=&quot;nofollow&quot;&gt;VMware Developer&lt;/a&gt; community.]]></description>
			<content:encoded><![CDATA[<p>@aihx, I see.<br />
I&#8217;m afraid I don&#8217;t know how to talk to vSphere through raw SOAP packages.<br />
Perhaps you could raise your question in the <a href="https://communities.vmware.com/community/vmtn/developer" rel="nofollow">VMware Developer</a> community.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: aihx		</title>
		<link>https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-1378</link>

		<dc:creator><![CDATA[aihx]]></dc:creator>
		<pubDate>Thu, 29 Dec 2011 09:48:21 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=515#comment-1378</guid>

					<description><![CDATA[Hi all,

 

 

I used Onyx to debug what the client sent to server;

 

I get SOAP message;

 

I copy it anh use another to sent to server (pass authenticate) but it have an error

 

 

Array ( [faultcode] =&#062; ServerFaultCode [faultstring] =&#062; Unable to find  specified dynamic type VirtualEthernetCardDistributedVirtualPortBackingInfo  while parsing serialized DataObject of type  vim.vm.device.VirtualDevice.BackingInfo at line 15, column 12 while parsing  property &quot;backing&quot; of static type VirtualDeviceBackingInfo while parsing  serialized DataObject of type vim.vm.device.VirtualE1000 at line 9, column 10  while parsing property &quot;device&quot; of static type VirtualDevice while parsing  serialized DataObject of type vim.vm.device.VirtualDeviceSpec at line 7, column  8 while parsing property &quot;deviceChange&quot; of static type  ArrayOfVirtualDeviceConfigSpec while parsing serialized DataObject of type  vim.vm.ConfigSpec at line 5, column 6 while parsing call information for method  ReconfigVM_Task at line 3, column 4 while parsing SOAP body at line 2, column 2  while parsing SOAP envelope at line 1, column 0 while parsing HTTP request for  method reconfigure on object of type vim.VirtualMachine at line 1, column 0  [detail] =&#062; Array ( [InvalidRequestFault] =&#062; ) )

 

 

pls tell me how; how Vsphere client can sent]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>I used Onyx to debug what the client sent to server;</p>
<p>I get SOAP message;</p>
<p>I copy it anh use another to sent to server (pass authenticate) but it have an error</p>
<p>Array ( [faultcode] =&gt; ServerFaultCode [faultstring] =&gt; Unable to find  specified dynamic type VirtualEthernetCardDistributedVirtualPortBackingInfo  while parsing serialized DataObject of type  vim.vm.device.VirtualDevice.BackingInfo at line 15, column 12 while parsing  property &#8220;backing&#8221; of static type VirtualDeviceBackingInfo while parsing  serialized DataObject of type vim.vm.device.VirtualE1000 at line 9, column 10  while parsing property &#8220;device&#8221; of static type VirtualDevice while parsing  serialized DataObject of type vim.vm.device.VirtualDeviceSpec at line 7, column  8 while parsing property &#8220;deviceChange&#8221; of static type  ArrayOfVirtualDeviceConfigSpec while parsing serialized DataObject of type  vim.vm.ConfigSpec at line 5, column 6 while parsing call information for method  ReconfigVM_Task at line 3, column 4 while parsing SOAP body at line 2, column 2  while parsing SOAP envelope at line 1, column 0 while parsing HTTP request for  method reconfigure on object of type vim.VirtualMachine at line 1, column 0  [detail] =&gt; Array ( [InvalidRequestFault] =&gt; ) )</p>
<p>pls tell me how; how Vsphere client can sent</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: aihx		</title>
		<link>https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-1377</link>

		<dc:creator><![CDATA[aihx]]></dc:creator>
		<pubDate>Thu, 29 Dec 2011 06:54:54 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=515#comment-1377</guid>

					<description><![CDATA[HI LucD

I use vSphere Client and Onyx to get XML


&lt;code&gt; 
add
-100
b2 57 13 50 92 89 c3 d5-d4 23 15 6d 9f fb 34 7b
dvportgroup-21
VM Network
true
true
true
100
generated
true
&lt;/code&gt;            

I use PHP with SOAP to send XML to vmware; but get this error


when you use java or .net it also create a xml and send to vmware (call API)

i use vm 5]]></description>
			<content:encoded><![CDATA[<p>HI LucD</p>
<p>I use vSphere Client and Onyx to get XML</p>
<p><code><br />
add<br />
-100<br />
b2 57 13 50 92 89 c3 d5-d4 23 15 6d 9f fb 34 7b<br />
dvportgroup-21<br />
VM Network<br />
true<br />
true<br />
true<br />
100<br />
generated<br />
true<br />
</code>            </p>
<p>I use PHP with SOAP to send XML to vmware; but get this error</p>
<p>when you use java or .net it also create a xml and send to vmware (call API)</p>
<p>i use vm 5</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-1376</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Wed, 28 Dec 2011 08:44:08 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=515#comment-1376</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-1375&quot;&gt;aihx&lt;/a&gt;.

@aihx, you are saying that
&lt;code&gt;
New-Object VMware.Vim.VirtualEthernetCardDistributedVirtualPortBackingInfo
&lt;/code&gt;
doesn&#039;t work for you and that it returns an error ?
Which PowerCLI version are you using ? Do a
&lt;code&gt;
Get-PowerCLIVersion
&lt;/code&gt;]]></description>
			<content:encoded><![CDATA[<p>@aihx, you are saying that<br />
<code><br />
New-Object VMware.Vim.VirtualEthernetCardDistributedVirtualPortBackingInfo<br />
</code><br />
doesn&#8217;t work for you and that it returns an error ?<br />
Which PowerCLI version are you using ? Do a<br />
<code><br />
Get-PowerCLIVersion<br />
</code></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: aihx		</title>
		<link>https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-1375</link>

		<dc:creator><![CDATA[aihx]]></dc:creator>
		<pubDate>Wed, 28 Dec 2011 08:23:33 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=515#comment-1375</guid>

					<description><![CDATA[Unable to find specified dynamic type VirtualEthernetCardDistributedVirtualPortBackingInfo 

I get this error; I do not know what happen whith VW; I only send XML to WSDL]]></description>
			<content:encoded><![CDATA[<p>Unable to find specified dynamic type VirtualEthernetCardDistributedVirtualPortBackingInfo </p>
<p>I get this error; I do not know what happen whith VW; I only send XML to WSDL</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-1282</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Fri, 11 Nov 2011 11:58:21 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=515#comment-1282</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-1281&quot;&gt;Tom&lt;/a&gt;.

Thanks Tom, much appreciated.
There is since a couple of days a fling available that provides dvSwitch cmdlets.
Have a look at the &lt;a href=&quot;https://blogs.vmware.com/vipowershell/2011/11/vsphere-distributed-switch-powercli-cmdlets.html&quot; rel=&quot;nofollow&quot;&gt;vSphere Distributed Switch PowerCLI cmdlets&lt;/a&gt; blog post.]]></description>
			<content:encoded><![CDATA[<p>Thanks Tom, much appreciated.<br />
There is since a couple of days a fling available that provides dvSwitch cmdlets.<br />
Have a look at the <a href="https://blogs.vmware.com/vipowershell/2011/11/vsphere-distributed-switch-powercli-cmdlets.html" rel="nofollow">vSphere Distributed Switch PowerCLI cmdlets</a> blog post.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Tom		</title>
		<link>https://www.lucd.info/2009/10/12/dvswitch-scripting-part-2-dvportgroup/#comment-1281</link>

		<dc:creator><![CDATA[Tom]]></dc:creator>
		<pubDate>Fri, 11 Nov 2011 08:12:05 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=515#comment-1281</guid>

					<description><![CDATA[Just thought I&#039;d post to say a big THANK YOU!. These scripts are amazing and have saved me sooo much time. I don&#039;t understand why vmware didn&#039;t add this functionality into PowerCLI

You certainly know your stuff

Good work!

Tom]]></description>
			<content:encoded><![CDATA[<p>Just thought I&#8217;d post to say a big THANK YOU!. These scripts are amazing and have saved me sooo much time. I don&#8217;t understand why vmware didn&#8217;t add this functionality into PowerCLI</p>
<p>You certainly know your stuff</p>
<p>Good work!</p>
<p>Tom</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
