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