<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>VMware Communities: Message List - Adding NFS shares accross multiple ESX servers.</title>
    <link>http://communities.vmware.com/community/vmtn/vsphere/automationtools/windows_toolkit?view=discussions</link>
    <description>Most recent forum messages</description>
    <language>en</language>
    <pubDate>Tue, 16 Jun 2009 04:51:36 GMT</pubDate>
    <generator>Clearspace 1.10.12 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2009-06-16T04:51:36Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>Re: Adding NFS shares accross multiple ESX servers.</title>
      <link>http://communities.vmware.com/message/1284968?tstart=0#1284968</link>
      <description>Is there really a Get-VmHost on the Connect-ViServer line ?&lt;br /&gt;
It should be&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;Import-Csv &amp;quot;C:\scripts\input.csv&amp;quot; -Header MyVC | %{
   Connect-VIServer -Server $_.MyVC
...
}
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
Perhaps you could PM me the script your are trying to use.&lt;br /&gt;
The forum SW sometimes scrambles code one inserts in a post.</description>
      <pubDate>Tue, 16 Jun 2009 04:51:36 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1284968?tstart=0#1284968</guid>
      <dc:date>2009-06-16T04:51:36Z</dc:date>
      <clearspace:dateToText>5 months, 1 week ago</clearspace:dateToText>
    </item>
    <item>
      <title>Re: Adding NFS shares accross multiple ESX servers.</title>
      <link>http://communities.vmware.com/message/1284750?tstart=0#1284750</link>
      <description>&lt;br /&gt;
Yea, I tried breaking this down and I get the CSV file imported succesfully.&lt;br /&gt;
&lt;p /&gt;
 Here is what I am doing to troubleshoot.&lt;br /&gt;
&lt;p /&gt;
&lt;b&gt;This part works fine, when I run this it returns the 2 host servers in the csv file&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Import-Csv "C:\scripts\input.csv" &lt;i&gt;-Header&lt;/i&gt; MyVC&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;b&gt;This part errors out:&lt;/b&gt; &lt;br /&gt;
**%{*Connect-VIServer* &lt;i&gt;-Server&lt;/i&gt; $_.MyVC Get-VmHost*&lt;br /&gt;
&lt;p /&gt;
 *</description>
      <pubDate>Mon, 15 Jun 2009 21:32:17 GMT</pubDate>
      <author>jeff5144</author>
      <guid>http://communities.vmware.com/message/1284750?tstart=0#1284750</guid>
      <dc:date>2009-06-15T21:32:17Z</dc:date>
      <clearspace:dateToText>5 months, 1 week ago</clearspace:dateToText>
      <clearspace:replyCount>1</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Adding NFS shares accross multiple ESX servers.</title>
      <link>http://communities.vmware.com/message/1284749?tstart=0#1284749</link>
      <description>There must be something wrong but I can't see what it is.&lt;br /&gt;
This is from a run of such a script on my test PC.&lt;br /&gt;
Note that I replaced the Connect-ViServer by a Write-Host to see the variable.&lt;br /&gt;
&lt;br /&gt;
 &lt;img src="http://communities.vmware.com/servlet/JiveServlet/downloadImage/2-1284749-5998/importCSV.png" alt="importCSV.png" width="450" class="jive-image-thumbnail jive-image" onclick="myJiveImage.start(this, 'http://communities.vmware.com/servlet/JiveServlet/downloadImage/2-1284749-5998/importCSV.png');return false;"/&gt; &lt;br /&gt;
&lt;br /&gt;
 &lt;img src="http://communities.vmware.com/servlet/JiveServlet/downloadImage/2-1284749-5999/testCSV.png" alt="testCSV.png" class="jive-image"  /&gt; &lt;br /&gt;
&lt;br /&gt;
If you want to add multiple NFS datastores you have to repeat the line with the New-Datastore cmdlet.</description>
      <pubDate>Mon, 15 Jun 2009 21:28:01 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1284749?tstart=0#1284749</guid>
      <dc:date>2009-06-15T21:28:01Z</dc:date>
      <clearspace:dateToText>5 months, 1 week ago</clearspace:dateToText>
      <clearspace:replyCount>2</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Adding NFS shares accross multiple ESX servers.</title>
      <link>http://communities.vmware.com/message/1284700?tstart=0#1284700</link>
      <description>&lt;br /&gt;
Its exactly as below, I'm testing this against 2 hosts for the time being. &lt;br /&gt;
&lt;br /&gt;
Thank you for assisting. Another question if you want to add multiple datastores?&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;p /&gt;
servername.domain.com&lt;br /&gt;
&lt;p /&gt;
servername.domain.com</description>
      <pubDate>Mon, 15 Jun 2009 21:15:27 GMT</pubDate>
      <author>jeff5144</author>
      <guid>http://communities.vmware.com/message/1284700?tstart=0#1284700</guid>
      <dc:date>2009-06-15T21:15:27Z</dc:date>
      <clearspace:dateToText>5 months, 1 week ago</clearspace:dateToText>
      <clearspace:replyCount>3</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Adding NFS shares accross multiple ESX servers.</title>
      <link>http://communities.vmware.com/message/1284697?tstart=0#1284697</link>
      <description>It looks like the import form the CSV file is not functioning.&lt;br /&gt;
Could you perhaps include a screenshot of the first few lines of this VC file?&lt;br /&gt;
You can scramble the text if you need to, I just want to see the layout.</description>
      <pubDate>Mon, 15 Jun 2009 21:00:59 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1284697?tstart=0#1284697</guid>
      <dc:date>2009-06-15T21:00:59Z</dc:date>
      <clearspace:dateToText>5 months, 1 week ago</clearspace:dateToText>
      <clearspace:replyCount>4</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Adding NFS shares accross multiple ESX servers.</title>
      <link>http://communities.vmware.com/message/1284649?tstart=0#1284649</link>
      <description>&lt;br /&gt;
I've been trying your script above and it keeps giving me the error at : Connect-VIServer -Server &amp;lt;&amp;lt;&amp;lt;&amp;lt;  $_.MyVC&lt;br /&gt;
&lt;p /&gt;
&lt;p /&gt;
&lt;br /&gt;
*&lt;br /&gt;
&lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=vSphere+PowerCLI"&gt;vSphere PowerCLI&lt;/a&gt; C:\Program Files\VMware\Infrastructure\VIToolkitForWindows&amp;gt; Connect-VIServer -Server $_.MyVC*&lt;br /&gt;
&lt;b&gt;Connect-VIServer : Cannot validate argument on parameter 'Server'. The argument cannot be null or empty.&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;At line:1 char:25&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;+ Connect-VIServer -Server &amp;lt;&amp;lt;&amp;lt;&amp;lt;  $_.MyVC&lt;/b&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;+ CategoryInfo          : InvalidData: (:) &lt;a class="jive-link-adddocument" href="http://communities.vmware.com/community-document-picker.jspa?communityID=&amp;subject=Connect-VIServer"&gt;Connect-VIServer&lt;/a&gt;, ParameterBindingValidationException*&lt;/li&gt;
&lt;li&gt;+ FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.Commands.ConnectVIServer&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
*</description>
      <pubDate>Mon, 15 Jun 2009 20:26:06 GMT</pubDate>
      <author>jeff5144</author>
      <guid>http://communities.vmware.com/message/1284649?tstart=0#1284649</guid>
      <dc:date>2009-06-15T20:26:06Z</dc:date>
      <clearspace:dateToText>5 months, 1 week ago</clearspace:dateToText>
      <clearspace:replyCount>5</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Adding NFS shares accross multiple ESX servers.</title>
      <link>http://communities.vmware.com/message/1284476?tstart=0#1284476</link>
      <description>I'll assume that the CSV file contains the names of the VCs.&lt;br /&gt;
Then you can do something like this provided you have a header row in the CSV that says "VCname"&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;Import-Csv &amp;quot;C:\cvname.csv&amp;quot; | %{
	Connect-VIServer -Server $_.VCname
	Get-VmHost | New-Datastore -Nfs -Name NFSds -Path NFSds -RemoteHost &amp;lt;NFSserver&amp;gt; -RemotePath &amp;lt;NFSexport&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
If there is no header row you can do&lt;br /&gt;
&lt;pre class="jive-pre"&gt;&lt;code class="jive-code jive-plain"&gt;Import-Csv &amp;quot;C:\cvname.csv&amp;quot; -Header MyVC | %{
	Connect-VIServer -Server $_.MyVC
	Get-VmHost | New-Datastore -Nfs -Name NFSds -Path NFSds -RemoteHost &amp;lt;NFSserver&amp;gt; -RemotePath &amp;lt;NFSexport&amp;gt;
}
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
This assumes that the account with which you execute the script has rights on all the VCs.&lt;br /&gt;
The Connect-ViServer uses passthrough authentication.</description>
      <pubDate>Mon, 15 Jun 2009 18:11:24 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1284476?tstart=0#1284476</guid>
      <dc:date>2009-06-15T18:11:24Z</dc:date>
      <clearspace:dateToText>5 months, 1 week ago</clearspace:dateToText>
      <clearspace:replyCount>6</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Adding NFS shares accross multiple ESX servers.</title>
      <link>http://communities.vmware.com/message/1284137?tstart=0#1284137</link>
      <description>&lt;br /&gt;
The CSV file will contain the host name and IP address in which we'll inject a different user account.</description>
      <pubDate>Mon, 15 Jun 2009 14:11:23 GMT</pubDate>
      <author>jeff5144</author>
      <guid>http://communities.vmware.com/message/1284137?tstart=0#1284137</guid>
      <dc:date>2009-06-15T14:11:23Z</dc:date>
      <clearspace:dateToText>5 months, 1 week ago</clearspace:dateToText>
      <clearspace:replyCount>7</clearspace:replyCount>
    </item>
    <item>
      <title>Re: Adding NFS shares accross multiple ESX servers.</title>
      <link>http://communities.vmware.com/message/1282703?tstart=0#1282703</link>
      <description>Could you perhaps describe what is in the CSV file ? VC names and/or ESX hostnames ?&lt;br /&gt;
And where will get the account/password to logon to the VCs ? Or will this go via pass through with the account that runs the script ?&lt;br /&gt;
&lt;br /&gt;
Adding a NFS datastore can be done with the New-Datastore cmdlet.&lt;br /&gt;
See  &lt;a href="http://communities.vmware.com/message/896856#896856" class="jive-link-message"&gt;NFS mount on multiple hosts&lt;/a&gt;</description>
      <pubDate>Fri, 12 Jun 2009 22:41:28 GMT</pubDate>
      <author>LucD</author>
      <guid>http://communities.vmware.com/message/1282703?tstart=0#1282703</guid>
      <dc:date>2009-06-12T22:41:28Z</dc:date>
      <clearspace:dateToText>5 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>8</clearspace:replyCount>
    </item>
    <item>
      <title>Adding NFS shares accross multiple ESX servers.</title>
      <link>http://communities.vmware.com/message/1282656?tstart=0#1282656</link>
      <description>&lt;br /&gt;
Can anyone assist with using the powershell command to add mutiple NFS shares accross multiple virtual centers reading from a CSV file.&lt;br /&gt;
&lt;p /&gt;
 Task&lt;br /&gt;
Create powershell command to look to a CSV file with a list of ESX hosts in different virtual center servers.&lt;br /&gt;
&lt;p /&gt;
Add 4 NFS datastores.&lt;br /&gt;
&lt;p /&gt;
Any assistance would be much appreciated!&lt;br /&gt;
&lt;p /&gt;
&lt;br /&gt;</description>
      <pubDate>Fri, 12 Jun 2009 21:35:40 GMT</pubDate>
      <author>jeff5144</author>
      <guid>http://communities.vmware.com/message/1282656?tstart=0#1282656</guid>
      <dc:date>2009-06-12T21:35:40Z</dc:date>
      <clearspace:dateToText>5 months, 2 weeks ago</clearspace:dateToText>
      <clearspace:replyCount>9</clearspace:replyCount>
    </item>
  </channel>
</rss>

