<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to add the correct values DNS,Gateway,Mask in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/How-to-add-the-correct-values-DNS-Gateway-Mask/m-p/2920855#M107554</link>
    <description>&lt;P&gt;As far as I can see there is no way to split out the DNS information by vNIC.&lt;BR /&gt;&lt;BR /&gt;The only solution I see to ask inside the Guest OS, by for example Invoke-VMScript&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 16:53:51 GMT</pubDate>
    <dc:creator>LucD</dc:creator>
    <dc:date>2022-07-27T16:53:51Z</dc:date>
    <item>
      <title>How to add the correct values DNS,Gateway,Mask</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/How-to-add-the-correct-values-DNS-Gateway-Mask/m-p/2920740#M107545</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;Help me figure out the problem!&lt;BR /&gt;I can't find the correct values for DNS, Gateway, Mask. So that each address corresponds to the correct value&amp;nbsp;DNS, Gateway, Mask.&lt;/P&gt;&lt;P&gt;Script:&lt;/P&gt;&lt;P&gt;Get-Cluster | Get-VM -PipelineVariable vm | Get-NetworkAdapter |&lt;BR /&gt;Select @{N='VM';E={$vm.Name}},NetworkName, MacAddress,&lt;BR /&gt;@{N=”IP Address”;E={&lt;BR /&gt;$nic = $_&lt;BR /&gt;$ips = ($vm.Guest.Nics | where{$_.Device.Name -eq $nic.Name}).IPAddress&lt;BR /&gt;($ips | where{([ipaddress]$_).AddressFamily -eq 'InterNetwork'}) -join '|'}},&lt;BR /&gt;@{N='Gateway';E={($VM.ExtensionData.Guest.IpStack.IpRouteConfig.IpRoute.Gateway.IPaddress | where{$_ -ne $null}) }},&lt;BR /&gt;@{N="DNS";E={$vm.ExtensionData.Guest.IpStack.DnsConfig.IpAddress}},&lt;BR /&gt;@{N="Subnet Mask";E={$vm.ExtensionData.Guest.Net.IpConfig.IpAddress.PrefixLength}},&lt;BR /&gt;@{N='OS';E={$vm.Guest.OSFullName}},&lt;BR /&gt;@{N="Attributes";E={[string]::Join('|',($VM.ExtensionData.Value.Value))}} | Out-GridView&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 07:38:50 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/How-to-add-the-correct-values-DNS-Gateway-Mask/m-p/2920740#M107545</guid>
      <dc:creator>Igor5</dc:creator>
      <dc:date>2022-07-27T07:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the correct values DNS,Gateway,Mask</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/How-to-add-the-correct-values-DNS-Gateway-Mask/m-p/2920749#M107546</link>
      <description>&lt;P&gt;What is the problem?&lt;BR /&gt;This seems to work for me.&lt;BR /&gt;Do you have the VMware Tools installed on those VMs?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 07:51:47 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/How-to-add-the-correct-values-DNS-Gateway-Mask/m-p/2920749#M107546</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2022-07-27T07:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the correct values DNS,Gateway,Mask</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/How-to-add-the-correct-values-DNS-Gateway-Mask/m-p/2920779#M107547</link>
      <description>&lt;P&gt;The script works and brings information.&lt;BR /&gt;But if I have 4 network interfaces, then the gateway, DNS and mask are going into one. And I want each interface to correspond to its gateway, DNS and mask.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 10:21:16 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/How-to-add-the-correct-values-DNS-Gateway-Mask/m-p/2920779#M107547</guid>
      <dc:creator>Igor5</dc:creator>
      <dc:date>2022-07-27T10:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the correct values DNS,Gateway,Mask</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/How-to-add-the-correct-values-DNS-Gateway-Mask/m-p/2920855#M107554</link>
      <description>&lt;P&gt;As far as I can see there is no way to split out the DNS information by vNIC.&lt;BR /&gt;&lt;BR /&gt;The only solution I see to ask inside the Guest OS, by for example Invoke-VMScript&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 16:53:51 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/How-to-add-the-correct-values-DNS-Gateway-Mask/m-p/2920855#M107554</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2022-07-27T16:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the correct values DNS,Gateway,Mask</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/How-to-add-the-correct-values-DNS-Gateway-Mask/m-p/2921048#M107569</link>
      <description>&lt;P&gt;Thanks for the help. I tried to make a match by values, but nothing came out. That's why I wrote here. I thought they would help me here.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 12:05:24 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/How-to-add-the-correct-values-DNS-Gateway-Mask/m-p/2921048#M107569</guid>
      <dc:creator>Igor5</dc:creator>
      <dc:date>2022-07-28T12:05:24Z</dc:date>
    </item>
  </channel>
</rss>

