Microsoft Virtualization Discussions

How to establish iscsi sessions using powershell?

DAVID_PUCKETT_KAREO
3,044 Views

Anyone have an example of establishing iscsi sessions using powershell?

Thanks

1 REPLY 1

vinith
3,044 Views

Connect-NaController TS60808

New-NaAggr bigaggr -Use64Bit -DiskCount 32

New-NaVol bigvol -Aggregate bigaggr 4t

Set-NaSnapshotReserve bigvol 0

New-NaLun -Path /vol/bigvol/biglun -Size 3.5t -Type hyper_v

Add-NaHostIscsiTargetPortal

$session = Get-NaHostIscsiSession -TargetName (Get-NaIscsiNodeName)

if ($session -eq $null) { Get-NaHostIscsiTarget (Get-NaIscsiNodeName) | Connect-NaHostIscsiTarget }

New-NaIgroup bigigroup iscsi windows

Get-NaHostIscsiAdapter | Add-NaIgroupInitiator bigigroup

Add-NaLunMap /vol/bigvol/biglun bigigroup

Start-NaHostDiskRescan

Wait-NaHostDisk /vol/bigvol/biglun TS60808 | New-NaHostVolume

Refer the "Host-side iSCSI & FC utilities" section at

https://communities.netapp.com/docs/DOC-10684


Public