<?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 &#8211; Part 8 &#8211; Get and Set network adapters	</title>
	<atom:link href="https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/</link>
	<description>My PowerShell ramblings</description>
	<lastBuildDate>Wed, 08 Apr 2020 10:23:33 +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: Ed		</title>
		<link>https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-3663</link>

		<dc:creator><![CDATA[Ed]]></dc:creator>
		<pubDate>Thu, 15 Oct 2015 18:24:23 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1871#comment-3663</guid>

					<description><![CDATA[Luc,

I was looking to use this to migrate several hundred VMs but the latest powercli includes several new fields.  How would this be written for the current version of powercli?  Or, how can I get powercli to build a NetworkAdapter from this?]]></description>
			<content:encoded><![CDATA[<p>Luc,</p>
<p>I was looking to use this to migrate several hundred VMs but the latest powercli includes several new fields.  How would this be written for the current version of powercli?  Or, how can I get powercli to build a NetworkAdapter from this?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: JJ		</title>
		<link>https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-3489</link>

		<dc:creator><![CDATA[JJ]]></dc:creator>
		<pubDate>Thu, 30 Apr 2015 14:06:45 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1871#comment-3489</guid>

					<description><![CDATA[Hello,
Is there anyway to call this using get-view instead of get-vm?
I&#039;m trying to applied to all machines in the dvswitch but only to a determined hosts.
Regards,
JJ]]></description>
			<content:encoded><![CDATA[<p>Hello,<br />
Is there anyway to call this using get-view instead of get-vm?<br />
I&#8217;m trying to applied to all machines in the dvswitch but only to a determined hosts.<br />
Regards,<br />
JJ</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: shashi		</title>
		<link>https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-2886</link>

		<dc:creator><![CDATA[shashi]]></dc:creator>
		<pubDate>Mon, 18 Nov 2013 10:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1871#comment-2886</guid>

					<description><![CDATA[Hello , 

First of all thanks for providing the script . Its very handy . But when I run the script it changes port group as expected but the NIC status would be disconnected . I.e . Connected and Connect at poweron checkbox are unchecked. Could you please help me to fix this . 
thanks in advance !!!..]]></description>
			<content:encoded><![CDATA[<p>Hello , </p>
<p>First of all thanks for providing the script . Its very handy . But when I run the script it changes port group as expected but the NIC status would be disconnected . I.e . Connected and Connect at poweron checkbox are unchecked. Could you please help me to fix this .<br />
thanks in advance !!!..</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Batuhan		</title>
		<link>https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-1862</link>

		<dc:creator><![CDATA[Batuhan]]></dc:creator>
		<pubDate>Thu, 22 Nov 2012 07:26:07 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1871#comment-1862</guid>

					<description><![CDATA[Hi, I know this is an old thread but this script has been great use to me. It works great, assigns the dvSwitch to the VM fine, but the script enters an infinite loop of errors after the configuration is done. The VM works fine, the network adapter is changed fine. The error is:

Exception calling &quot;UpdateViewData&quot; with &quot;1&quot; argument(s): &quot;&quot;
At line:83 char:25
+                 $task.UpdateViewData &#060;&#060;&#060;&#060; (&#034;Info&#034;)
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException

I am using this with PowerCLI 5 latest release. Maybe something deprecated as this is an old script. I tried to use the &#034;Set-NetworkAdapter&#034; command but it does not work with dvSwitch networks. Any help appreciated, thanks.]]></description>
			<content:encoded><![CDATA[<p>Hi, I know this is an old thread but this script has been great use to me. It works great, assigns the dvSwitch to the VM fine, but the script enters an infinite loop of errors after the configuration is done. The VM works fine, the network adapter is changed fine. The error is:</p>
<p>Exception calling &#8220;UpdateViewData&#8221; with &#8220;1&#8221; argument(s): &#8220;&#8221;<br />
At line:83 char:25<br />
+                 $task.UpdateViewData &lt;&lt;&lt;&lt; (&quot;Info&quot;)<br />
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException<br />
    + FullyQualifiedErrorId : DotNetMethodException</p>
<p>I am using this with PowerCLI 5 latest release. Maybe something deprecated as this is an old script. I tried to use the &quot;Set-NetworkAdapter&quot; command but it does not work with dvSwitch networks. Any help appreciated, thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-910</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Wed, 09 Mar 2011 12:38:21 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1871#comment-910</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-909&quot;&gt;Ionut Nica&lt;/a&gt;.

@Ionut, no not really, in PowerCLI 4.1 and 4.1.1 some existing cmdlets were extended with dvSwitch functionality. See the &lt;a href=&quot;https://www.vmware.com/support/developer/PowerCLI/changelog.html#PowerCLI41U1&quot; rel=&quot;nofollow&quot;&gt;PowerCLI changelog&lt;/a&gt;. and search for &#039;distributed&#039;.]]></description>
			<content:encoded><![CDATA[<p>@Ionut, no not really, in PowerCLI 4.1 and 4.1.1 some existing cmdlets were extended with dvSwitch functionality. See the <a href="https://www.vmware.com/support/developer/PowerCLI/changelog.html#PowerCLI41U1" rel="nofollow">PowerCLI changelog</a>. and search for &#8216;distributed&#8217;.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ionut Nica		</title>
		<link>https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-909</link>

		<dc:creator><![CDATA[Ionut Nica]]></dc:creator>
		<pubDate>Wed, 09 Mar 2011 12:02:38 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1871#comment-909</guid>

					<description><![CDATA[Hi,

Did anything change with the introduction of powercli 4.1.1? do we still need these functions to get/set  network information?
we have not upgraded to 4.1.1 yet so I was wondering  about that.

Thanks
Ionut]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Did anything change with the introduction of powercli 4.1.1? do we still need these functions to get/set  network information?<br />
we have not upgraded to 4.1.1 yet so I was wondering  about that.</p>
<p>Thanks<br />
Ionut</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Drunky		</title>
		<link>https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-884</link>

		<dc:creator><![CDATA[Drunky]]></dc:creator>
		<pubDate>Thu, 24 Feb 2011 12:46:32 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1871#comment-884</guid>

					<description><![CDATA[&lt;a href=&quot;#comment-883&quot; rel=&quot;nofollow&quot;&gt;@LucD &lt;/a&gt; 
Great :) 

at now i have to pars each vmx file of every vm (with help of awk/sed/grep ) on esx side, removing such lines as 

ethernet0.dvs.switchId = &quot;1d a1 2c 50 6d 7a ea 59-d0 cd b9 8a d2 a3 2d 37&quot;
ethernet0.dvs.portId = &quot;133&quot;
ethernet0.dvs.portgroupId = &quot;dvportgroup-367&quot;
ethernet0.dvs.connectionId = &quot;1842595141&quot;

adding one line

ethernet0.networkName = &quot;temp&quot;

register those vm&#039;s with your function &quot;register-vm&quot; and only after that changing portgroup from &quot;temp&quot; to what i need &quot;dvportgroup&quot; 

and all of it is a part of &quot;SRM on scripts&quot; ^_^]]></description>
			<content:encoded><![CDATA[<p><a href="#comment-883" rel="nofollow">@LucD </a><br />
Great 🙂 </p>
<p>at now i have to pars each vmx file of every vm (with help of awk/sed/grep ) on esx side, removing such lines as </p>
<p>ethernet0.dvs.switchId = &#8220;1d a1 2c 50 6d 7a ea 59-d0 cd b9 8a d2 a3 2d 37&#8221;<br />
ethernet0.dvs.portId = &#8220;133&#8221;<br />
ethernet0.dvs.portgroupId = &#8220;dvportgroup-367&#8221;<br />
ethernet0.dvs.connectionId = &#8220;1842595141&#8221;</p>
<p>adding one line</p>
<p>ethernet0.networkName = &#8220;temp&#8221;</p>
<p>register those vm&#8217;s with your function &#8220;register-vm&#8221; and only after that changing portgroup from &#8220;temp&#8221; to what i need &#8220;dvportgroup&#8221; </p>
<p>and all of it is a part of &#8220;SRM on scripts&#8221; ^_^</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-883</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Thu, 24 Feb 2011 11:47:10 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1871#comment-883</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-882&quot;&gt;Drunky&lt;/a&gt;.

@Drunky, thanks for the feedback.
I&#039;ll check if I can do something with the Register-VMX function for this.]]></description>
			<content:encoded><![CDATA[<p>@Drunky, thanks for the feedback.<br />
I&#8217;ll check if I can do something with the Register-VMX function for this.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Drunky		</title>
		<link>https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-882</link>

		<dc:creator><![CDATA[Drunky]]></dc:creator>
		<pubDate>Thu, 24 Feb 2011 10:55:48 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1871#comment-882</guid>

					<description><![CDATA[&lt;a href=&quot;#comment-881&quot; rel=&quot;nofollow&quot;&gt;@Drunky &lt;/a&gt; 
Never mind, i found the problem
Unfortunately if you removing VM from inventory and than add it back (no matter form GUI or by your great function register-vm), it (VM) comes back with no (blank)  portgroup, when using distributed switch]]></description>
			<content:encoded><![CDATA[<p><a href="#comment-881" rel="nofollow">@Drunky </a><br />
Never mind, i found the problem<br />
Unfortunately if you removing VM from inventory and than add it back (no matter form GUI or by your great function register-vm), it (VM) comes back with no (blank)  portgroup, when using distributed switch</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Drunky		</title>
		<link>https://www.lucd.info/2010/03/04/dvswitch-scripting-part-8-get-and-set-network-adapters/#comment-881</link>

		<dc:creator><![CDATA[Drunky]]></dc:creator>
		<pubDate>Thu, 24 Feb 2011 10:04:36 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=1871#comment-881</guid>

					<description><![CDATA[Hi Luc. Trying to use your function, but getting strange error

 Get-VMHost &#124; Get-Datastore -name &quot;CX3_virtual_lab_lun2&quot; &#124; get-vm &#124; Get-dvSwNetworkAdapter

Get-View : ?? ??????? ????????? ???????? ??? ????????? &quot;VIObject&quot;. ???????? ?????? ??? ???
?? ???????? NULL. ??????? ?? ?????? ????????, ?? ??????? ???????? NULL, ????? ???? ???????
?? ?????????? ???????.
C:\Scirpts5.ps1:158 ????:17
+         $VM &#124; Get-View &#060;&#060;&#060;&#060;  &#124; %{
    + CategoryInfo          : InvalidData: (:) [Get-View], ParameterBindingValidationExce 
   ption
    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCor 
   e.Cmdlets.Commands.DotNetInterop.GetVIView]]></description>
			<content:encoded><![CDATA[<p>Hi Luc. Trying to use your function, but getting strange error</p>
<p> Get-VMHost | Get-Datastore -name &#8220;CX3_virtual_lab_lun2&#8221; | get-vm | Get-dvSwNetworkAdapter</p>
<p>Get-View : ?? ??????? ????????? ???????? ??? ????????? &#8220;VIObject&#8221;. ???????? ?????? ??? ???<br />
?? ???????? NULL. ??????? ?? ?????? ????????, ?? ??????? ???????? NULL, ????? ???? ???????<br />
?? ?????????? ???????.<br />
C:\Scirpts5.ps1:158 ????:17<br />
+         $VM | Get-View &lt;&lt;&lt;&lt;  | %{<br />
    + CategoryInfo          : InvalidData: (:) [Get-View], ParameterBindingValidationExce<br />
   ption<br />
    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCor<br />
   e.Cmdlets.Commands.DotNetInterop.GetVIView</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
