<?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: Passing items from array to Get-VM ? in VMware PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Passing-items-from-array-to-Get-VM/m-p/1384610#M44326</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are using this in back order&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; . Values are already stored in $Mylist, you have to call these values by [0], [1], [2]... so on. This will work in this way :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Get-VM command before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: orangered;"&gt;&lt;SPAN style="color: #0000ff; font-family: 'Lucida Console'; font-size: 12px;"&gt;Get-VM &lt;SPAN style="color: #a9a9a9; font-family: 'Lucida Console'; font-size: 12px;"&gt;|&lt;/SPAN&gt; &lt;/SPAN&gt;$Mylist&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;[0&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: purple;"&gt;&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: orangered;"&gt;&lt;SPAN style="color: #0000ff; font-family: 'Lucida Console'; font-size: 12px;"&gt;Get-VM &lt;SPAN style="color: #a9a9a9; font-family: 'Lucida Console'; font-size: 12px;"&gt;|&lt;/SPAN&gt; &lt;/SPAN&gt;$Mylist&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;[&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: purple;"&gt;1&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;]&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: #666666;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: #666666;"&gt;Example :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: #666666;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/73354i54FB87D202B0F9F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jun 2017 10:32:45 GMT</pubDate>
    <dc:creator>vijayrana968</dc:creator>
    <dc:date>2017-06-22T10:32:45Z</dc:date>
    <item>
      <title>Passing items from array to Get-VM ?</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Passing-items-from-array-to-Get-VM/m-p/1384608#M44324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;$MyList = @()&lt;/P&gt;&lt;P&gt;$MyList += "VM1";&lt;/P&gt;&lt;P&gt;$MyList += "VM2";&lt;/P&gt;&lt;P&gt;$Mylist[1]|Get-VM;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives an error instead of showing the result for Get-VM VM2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background: #012456;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Lucida Console'; color: red;"&gt;Get-VM : Cannot process argument transformation on parameter 'Location'. Strings as pipeline input are not supported.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #012456;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Lucida Console'; color: red;"&gt;At line:4 char:12&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #012456;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Lucida Console'; color: red;"&gt;+ $Mylist[1]|Get-VM;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #012456;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Lucida Console'; color: red;"&gt;+ ~~~~~~&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #012456;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Lucida Console'; color: red;"&gt; + CategoryInfo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : InvalidData: (VM2:String) [Get-VM], ParameterBindingArgumentTransformationException&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background: #012456;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Lucida Console'; color: red;"&gt; + FullyQualifiedErrorId : ParameterArgumentTransformationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetVM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This workaround works:&lt;/P&gt;&lt;P&gt; &lt;SPAN lang="DA" style="font-size: 9.0pt; font-family: 'Lucida Console'; color: orangered;"&gt;$Mylist&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9.0pt; font-family: 'Lucida Console'; color: darkgray;"&gt;[&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9.0pt; font-family: 'Lucida Console'; color: purple;"&gt;1&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9.0pt; font-family: 'Lucida Console'; color: darkgray;"&gt;]&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9.0pt; font-family: 'Lucida Console';"&gt; &lt;SPAN style="color: darkgray;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;ForEach-Object&lt;/SPAN&gt;{ &lt;SPAN style="color: blue;"&gt;Get-VM&lt;/SPAN&gt; &lt;SPAN style="color: orangered;"&gt;$_&lt;/SPAN&gt;} &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DA" style="font-size: 9.0pt; font-family: 'Lucida Console';"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DA" style="font-size: 9.0pt; font-family: 'Lucida Console';"&gt;Why isn't is possible just to use&amp;nbsp; &lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: orangered;"&gt;$Mylist&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;[&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: purple;"&gt;1&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;]&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console';"&gt; &lt;SPAN style="color: darkgray;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;Get-VM &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 10:12:29 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Passing-items-from-array-to-Get-VM/m-p/1384608#M44324</guid>
      <dc:creator>jravnsba1</dc:creator>
      <dc:date>2017-06-22T10:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Passing items from array to Get-VM ?</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Passing-items-from-array-to-Get-VM/m-p/1384609#M44325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because the &lt;STRONG&gt;Name&lt;/STRONG&gt; parameter on the &lt;A href="https://www.vmware.com/support/developer/PowerCLI/PowerCLI65R1/html/Get-VM.html"&gt;Get-VM&lt;/A&gt; cmdlet is not defined as a parameter that can be provided through the pipeline.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pipeline.png"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/73351iD7AC39D14D9A9AD6/image-size/large?v=v2&amp;amp;px=999" role="button" title="pipeline.png" alt="pipeline.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 10:29:35 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Passing-items-from-array-to-Get-VM/m-p/1384609#M44325</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2017-06-22T10:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Passing items from array to Get-VM ?</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Passing-items-from-array-to-Get-VM/m-p/1384610#M44326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are using this in back order&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.vmware.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; . Values are already stored in $Mylist, you have to call these values by [0], [1], [2]... so on. This will work in this way :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use Get-VM command before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: orangered;"&gt;&lt;SPAN style="color: #0000ff; font-family: 'Lucida Console'; font-size: 12px;"&gt;Get-VM &lt;SPAN style="color: #a9a9a9; font-family: 'Lucida Console'; font-size: 12px;"&gt;|&lt;/SPAN&gt; &lt;/SPAN&gt;$Mylist&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;[0&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: purple;"&gt;&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: orangered;"&gt;&lt;SPAN style="color: #0000ff; font-family: 'Lucida Console'; font-size: 12px;"&gt;Get-VM &lt;SPAN style="color: #a9a9a9; font-family: 'Lucida Console'; font-size: 12px;"&gt;|&lt;/SPAN&gt; &lt;/SPAN&gt;$Mylist&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;[&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: purple;"&gt;1&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;]&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: #666666;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: #666666;"&gt;Example :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: #666666;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/73354i54FB87D202B0F9F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 10:32:45 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Passing-items-from-array-to-Get-VM/m-p/1384610#M44326</guid>
      <dc:creator>vijayrana968</dc:creator>
      <dc:date>2017-06-22T10:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Passing items from array to Get-VM ?</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Passing-items-from-array-to-Get-VM/m-p/1384611#M44327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure what you are trying to say, but &lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: orangered;"&gt;&lt;SPAN style="color: #0000ff; font-family: 'Lucida Console'; font-size: 12px;"&gt;Get-VM &lt;SPAN style="color: #a9a9a9; font-family: 'Lucida Console'; font-size: 12px;"&gt;|&lt;/SPAN&gt; &lt;/SPAN&gt;$Mylist&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;[0&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: purple;"&gt;&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;]&lt;/SPAN&gt; will not work either &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.vmware.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 10:35:53 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Passing-items-from-array-to-Get-VM/m-p/1384611#M44327</guid>
      <dc:creator>LucD</dc:creator>
      <dc:date>2017-06-22T10:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: Passing items from array to Get-VM ?</title>
      <link>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Passing-items-from-array-to-Get-VM/m-p/1384612#M44328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad &lt;img id="smileysad" class="emoticon emoticon-smileysad" src="https://communities.vmware.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;, To be honest, I don't know the fundamentals but I was tweaking small scripts and one liner in DPM shell back in year or two for my day to day work where I was managing Tape library though shell. I have a little bit idea about variable, pipeline and loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess then Get-View can be used and then select-object with this. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: orangered;"&gt;$Mylist[0] &lt;SPAN style="font-weight: inherit; font-style: inherit; color: #a9a9a9;"&gt;|&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: 'Lucida Console'; font-size: 12px;"&gt; &lt;SPAN style="color: #0000ff; font-family: 'Lucida Console'; font-size: 12px;"&gt;Get-View | select-object .......&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang="DA" style="font-size: 9pt; font-family: 'Lucida Console'; color: darkgray;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or it can't be ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 13:39:21 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Passing-items-from-array-to-Get-VM/m-p/1384612#M44328</guid>
      <dc:creator>vijayrana968</dc:creator>
      <dc:date>2017-06-22T13:39:21Z</dc:date>
    </item>
  </channel>
</rss>

