Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 250391

Re: How to use powershell to create Fibre Channel datastores

$
0
0

Hi

Ok, I'm trying to use runtimename to create new datastores

Do you know why this doesn't work?

 

$esxName = 'slexavchyp002'
$runtimeName = "vmhba0:C0:T0:L1"
$dsName = "MyDS"
$esx = Get-VMHost -Name $esxName
$lun = Get-ScsiLun -VmHost $esx | where {$_.RuntimeName -eq $runtimeName}
New-Datastore -VMHost $esx -Path $lun.CanonicalName

Error:

New-Datastore : Parameter set cannot be resolved using the specified named parameters.
At D:\test.ps1:14 char:14
+ New-Datastore <<<<  -VMHost $esx -Path $lun.CanonicalName
    + CategoryInfo          : InvalidArgument: (:) [New-Datastore], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameterSet,VMware.VimAutomation.ViCore.Cmdlets.Commands.H
   ost.NewDatastore


Viewing all articles
Browse latest Browse all 250391

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>