Microsoft IscsiTarget reference: Modifies settings for the specified iSCSI target. The syntax and selected example below are adapted from the pinned Windows Server 2025 reference. Module availability, target configuration and delegated permissions determine whether it can run in your environment. Documentation and parameter text: Microsoft, CC BY 4.0; formatting adapted by Cmdlet World. No execution testing is claimed.
Use an account with the target resource permissions documented for Set-IscsiServerTarget. Modifying administrative cmdlets may require elevation or delegated administration. This catalog does not assert that ordinary users can execute the command.
Supported environments
Windows / IscsiTarget · Windows Server 2025 documentation; feature/module prerequisites apply
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.
-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.
-Credential
Specifies the credentials when connecting to a remote computer.
-Description
Specifies a description for the iSCSI target.
-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.
-EnableChap
Specifies whether CHAP is enabled for the iSCSI target.
-EnableReverseChap
Specifies whether reverse CHAP is enabled for the iSCSI target.
-EnforceIdleTimeoutDetection
Specifies whether to enforce idle time-out detection.
-FirstBurstLength
Specifies the length of the first burst.
-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.
-InputObject (required)
Accepts an iSCSI target object from the input pipeline.
-MaxBurstLength
Specifies the maximum burst length.
-MaxReceiveDataSegmentLength
Specifies the maximum receiver data segment length.
-PassThru
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.
-ReceiveBufferCount
Specifies the receiver buffer count.
-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.
-TargetIqn
Specifies the target iSCSI Qualified Name (IQN).
-TargetName (required)
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.
Prerequisites
Windows with the IscsiTarget module and the Windows feature or management tools that provide it. Confirm target connectivity and version compatibility using the linked Microsoft reference.
Security considerations
This cmdlet changes system state. Review every target and parameter in the official reference, test outside production, and prepare an appropriate backup or rollback. Do not execute the example automatically.
Examples
Example 2: Modify a description for a target
Set-IscsiServerTarget -TargetName "TargetOne" -Description "Target for initiator Appsvr"
This example sets the description for a target named TargetOne to Target for initiator Appsvr. Source: Microsoft, CC BY 4.0; transcript prompt/output removed. This example was not executed.