The Set-IscsiServerTarget cmdlet modifies settings for the iSCSi target and returns the corresponding iSCSI Target object if the PassThru parameter is specified.
Examples
Example 1: Remove all initiators associated with a target
This example assigns the target to all initiators that attempt to connect to it.
Because no validation is performed the iSCSI target when an initiator makes a connection, be very cautious when you use this configuration.
It is most useful when troubleshooting connection issues, because it removes the risk of Target-Initiator assignment errors.
Parameters
-Chap
Specifies the settings for Challenge Handshake Authentication Protocol (CHAP) user name and secret.
Use this parameter in combination with the EnableChap parameter if the CHAP is not enabled.
Parameter properties
Type:
PSCredential
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ComputerName
Specifies the computer name, or IP address, of the remote computer, if this cmdlet is run on a remote computer.
Specifies the cluster resource group network name, or cluster node name, if this cmdlet is run on a cluster configuration.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Credential
Specifies the credentials when connecting to a remote computer.
Parameter properties
Type:
PSCredential
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Description
Specifies a description for the iSCSI target.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Enable
Determines whether the specified iSCSI target is enabled or disabled.
If you specify a value of $True, the target is enabled.
If the target is already enabled, no action occurs.
If you specify a value of $False, the target is disabled.
If the target is already disabled, no action occurs.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-EnableChap
Specifies whether CHAP is enabled for the iSCSI target.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-EnableReverseChap
Specifies whether reverse CHAP is enabled for the iSCSI target.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-EnforceIdleTimeoutDetection
Specifies whether to enforce idle time-out detection.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-FirstBurstLength
Specifies the length of the first burst.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-InitiatorIds
Specifies the iSCSI initiator identifiers (IDs) to which the iSCSI target is assigned.
To assign a LUN or VHD to an iSCSI initiator, an iSCSI target is first created.
After the target is assigned to the initiator, a LUN is associated with the target.
The format of this parameter is IdType:Value.
The acceptable values for this parameter are: DNSName, IPAddress, IPv6Address, IQN, and MACAddress.
Parameter properties
Type:
InitiatorId[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-InputObject
Accepts an iSCSI target object from the input pipeline.
Parameter properties
Type:
IscsiServerTarget
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
InputObject
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MaxBurstLength
Specifies the maximum burst length.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-MaxReceiveDataSegmentLength
Specifies the maximum receiver data segment length.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-PassThru
Returns an object representing the item with which you are working.
By default, this cmdlet does not generate any output.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ReceiveBufferCount
Specifies the receiver buffer count.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ReverseChap
Specifies the reverse CHAP user name and secret.
Use this parameter in combination with the EnableReverseChap parameter if the Reverse CHAP is not enabled.
Parameter properties
Type:
PSCredential
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-TargetIqn
Specifies the target iSCSI Qualified Name (IQN).
Parameter properties
Type:
Iqn
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-TargetName
Specifies the name of the iSCSI target.
The target name cannot be changed here.
This parameter can be used to filter out the iSCSI Target objects.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
TargetName
Position:
0
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.