<?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: vSphere PowerCLI - Set VM's Annotations from csv in vSphere Update Manager PowerCLI Discussions</title>
    <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/vSphere-PowerCLI-Set-VM-s-Annotations-from-csv/m-p/1751872#M402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, Interesting. I have a problem in my environment where administrators are not updating the 'notes' field but we do seem to have a server patching excel document that lists what the application is and who the owner is. I need to take a look at what you have here and see if I can make something like this work in my environment. If I can just import a couple of the columns for each VM in a nice format that would be a huge WIN!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Edit: I have attached an example of what I am talking about. I want to import the 'Server Name' and 'Manager' fields into the notes section for the associated VM. (&lt;EM&gt;Not sure if I can put them on separate lines in the notes section&lt;/EM&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2015 11:50:44 GMT</pubDate>
    <dc:creator>nimos001</dc:creator>
    <dc:date>2015-05-13T11:50:44Z</dc:date>
    <item>
      <title>vSphere PowerCLI - Set VM's Annotations from csv</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/vSphere-PowerCLI-Set-VM-s-Annotations-from-csv/m-p/1751871#M401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;At our company we needed a simple script to update our VMs Annotations - It's not the best script ever but it works and I'd like to share it with the community:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console'; color: #006400;"&gt;# csv: VirtualMachine,Annotation,Value&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Lucida Console'; font-size: 9pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console'; color: #006400;"&gt;# Load vmWare vSphere PowerCLI Module&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console'; color: blue;"&gt;Add-PSSnapin&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt; &lt;SPAN style="color: #8a2be2;"&gt;VMware.VimAutomation.Core&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console'; color: #006400;"&gt;# Connect to vCenter&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; background: white;"&gt;&lt;SPAN style="color: blue; font-size: 9pt; font-family: 'Lucida Console';"&gt;Connect-VIServer&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt;&lt;SPAN style="color: #222222;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #8a2be2;"&gt;&amp;lt;vCenter&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #222222;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: navy;"&gt;-User&lt;/SPAN&gt;&lt;SPAN style="color: #222222;"&gt; &amp;lt;user&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Lucida Console'; font-size: 9pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console'; color: #006400;"&gt;# Import CSV and Set Annotations&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;Function&lt;/SPAN&gt; &lt;SPAN style="color: #8a2be2;"&gt;VM-Selection&lt;/SPAN&gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #ff4500;"&gt;$vms&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;=&lt;/SPAN&gt; @()&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Import-Csv&lt;/SPAN&gt; &lt;SPAN style="color: #8a2be2;"&gt;C:\vmware.csv&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;%&lt;/SPAN&gt;{&lt;SPAN style="color: #ff4500;"&gt;$vms&lt;/SPAN&gt; &lt;SPAN style="color: #a9a9a9;"&gt;+=&lt;/SPAN&gt; (&lt;SPAN style="color: blue;"&gt;Get-VM&lt;/SPAN&gt; &lt;SPAN style="color: navy;"&gt;-Name&lt;/SPAN&gt; &lt;SPAN style="color: #ff4500;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;.&lt;/SPAN&gt;VirtualMachine &lt;SPAN style="color: #a9a9a9;"&gt;|&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;Set-Annotation&lt;/SPAN&gt; &lt;SPAN style="color: navy;"&gt;-customattribute&lt;/SPAN&gt; &lt;SPAN style="color: #ff4500;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;.&lt;/SPAN&gt;Annotation &lt;SPAN style="color: navy;"&gt;-Value&lt;/SPAN&gt; &lt;SPAN style="color: #ff4500;"&gt;$_&lt;/SPAN&gt;&lt;SPAN style="color: #a9a9a9;"&gt;.&lt;/SPAN&gt;Value)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #00008b;"&gt;return&lt;/SPAN&gt; &lt;SPAN style="color: #ff4500;"&gt;$vms&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console';"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console'; color: blue;"&gt;VM-Selection&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console'; color: blue;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 11pt; font-family: Calibri, sans-serif; color: #222222; background: white;"&gt;&lt;SPAN style="font-size: 9pt; font-family: 'Lucida Console'; color: blue;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Calibri, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-size: 11pt;"&gt; &lt;/SPAN&gt;There are probably snipplets where you can find something similar - thanks for their great work!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 15:02:04 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/vSphere-PowerCLI-Set-VM-s-Annotations-from-csv/m-p/1751871#M401</guid>
      <dc:creator>mgente</dc:creator>
      <dc:date>2015-05-07T15:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: vSphere PowerCLI - Set VM's Annotations from csv</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/vSphere-PowerCLI-Set-VM-s-Annotations-from-csv/m-p/1751872#M402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, Interesting. I have a problem in my environment where administrators are not updating the 'notes' field but we do seem to have a server patching excel document that lists what the application is and who the owner is. I need to take a look at what you have here and see if I can make something like this work in my environment. If I can just import a couple of the columns for each VM in a nice format that would be a huge WIN!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Edit: I have attached an example of what I am talking about. I want to import the 'Server Name' and 'Manager' fields into the notes section for the associated VM. (&lt;EM&gt;Not sure if I can put them on separate lines in the notes section&lt;/EM&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 11:50:44 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/vSphere-PowerCLI-Set-VM-s-Annotations-from-csv/m-p/1751872#M402</guid>
      <dc:creator>nimos001</dc:creator>
      <dc:date>2015-05-13T11:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: vSphere PowerCLI - Set VM's Annotations from csv</title>
      <link>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/vSphere-PowerCLI-Set-VM-s-Annotations-from-csv/m-p/1751873#M403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess I am not wanting to actually set a custom attribute though, just wanting to populate the notes field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 14:18:44 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/vSphere-Update-Manager-PowerCLI/vSphere-PowerCLI-Set-VM-s-Annotations-from-csv/m-p/1751873#M403</guid>
      <dc:creator>nimos001</dc:creator>
      <dc:date>2015-05-13T14:18:44Z</dc:date>
    </item>
  </channel>
</rss>

