## PowerCLI Reference

# Get-VsanIscsiLun

## Synopsis

This cmdlet retrieves the vSAN iSCSI LUNs from a cluster or target.

Syntax

Get-VsanIscsiLun [-VsanIscsiTarget <VsanIscsiTarget[]>] [[-Name] <String[]>] [-LunId <Int32[]>] [-Cluster <Cluster[]>] [-Server <VIServer[]>] [<CommonParameters>]
Get-VsanIscsiLun -Id <String[]> [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves the vSAN iSCSI LUNs from a cluster or target.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Name | String[] | Filters the retrieved vSAN iSCSI LUNs by name. | false | false
Cluster | Cluster[] | Specifies the clusters from which to retrieve LUNs. | false | true (ByValue)
Id | String[] | Filters the retrieved vSAN iSCSI LUNs by ID. | true | false
LunId | Int32[] | Filters the retrieved vSAN iSCSI LUNs by LUN ID. | false | false
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false
VsanIscsiTarget | VsanIscsiTarget[] | Specifies the vSAN iSCSI targets from which to retrieve LUNs. | false | true (ByValue)

Return Type

Zero or more VsanIscsiLun objects

Notes

Examples

-------------- Example 1 --------------

    Get-VsanIscsiLun -Cluster ?vsan-cluster?

Retrieves all vSAN iSCSI LUNs from the ?vsan-cluster? cluster.

-------------- Example 2 --------------

    Get-VsanIscsiLun -Target $target -LunId 1

Retrieves the vSAN iSCSI LUNs with LunId 1 from the $target iSCSI target.

Copyright © VMware, Inc. All rights reserved.