Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (41 sloc) 1.89 KB
#The EQL Powershell Extension is required -
#The Nimble Powershell Module is required -
#Nick Shores 8-1-17
#Change paramaters below to match your enviornment
$vcenter =
$vcenteruser = yourusername
$vcenterpass = your vcenter password
$EqlCred = Get-Credential
$NimbleCred = Get-Credential
$nimblemgmt =
$eqlmgmt =
#Import Modules
Import-Module -Name 'C:\Program Files\EqualLogic\bin\EqlPSTools.dll'
import-module -Name 'NimblePowerShellToolKit'
#Connect to dependencies
connect-viserver -server $vcenter -User $vcenteruser -Password $vcenterpass
Connect-Eqlgroup -GroupAddress $eqlmgmt -Credential $EqlCred
Connect-NSGroup -group $nimblemgmt -credential $NimbleCred
#Get list of EQL Volumes to create
write-host 'Getting EQL Volumes...'
$eqlvolume = Get-EqlVolume
$volumestats = $eqlvolume | select VolumeName,VolumeSize
write-host "$volumestats"
Write-Host "Creating $eqlvolume.count New Volumes - Continue? "
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
#On nimble, create each volume
#TODO - Figure out how to set chap / initator access
foreach ($volume in $eqlvolume) {
new-nsvolume -name $volume.VolumeName -size $volume.VolumeSizeMB -multi_initiator $true
Get-NSVolume | select name-size
write-host "Creating Datastores"
#Find nimble LUN's / create new datastores
$id = Get-ScsiLun -vmhost * | Get-ScsiLunPath | ? {($_.Sanid -like '*nimble*') -and ($_.State -eq 'Active')}
foreach ($lun in $id){
$name = $lun.sanid -replace '.*?:(.+?)-.*','$1'
new-datastore -Name $name -path $lun.ScsiCanonicalName -vmhost *
#Rescan Hosts
Get-VMHostStorage -VMHost * -RescanAllHBA | Out-Null
write-host "Complete!"
You can’t perform that action at this time.