Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows Server 2025 / Configure an iSCSI Target and Initiator on Windows Server

October 20, 2025

Configure an iSCSI Target and Initiator on Windows Server

In this article, we will look at how to create iSCSI storage based on virtual disks on a Windows Server 2025 host and how to connect this storage (iSCSI LUN) to another Windows host over the network (the iSCSI configuration is identical for Windows Server 2022, 2019, and 2016).

Contents:
  • Install and Configure an iSCSI Target on Windows Server
  • Configure the iSCSI Initiator on Windows Server
  • Enable Multipathing (MPIO) with the iSCSI Initiator on Windows Server

The iSCSI (Internet Small Computer System) protocol provides access to remote storage devices via IP networks. The iSCSI protocol allows remote storage devices to connect over a standard TCP/IP network, eliminating the need for Fiber Channel infrastructure and additional equipment like storage bus controllers. The main components of iSCSI are:

  • iSCSI Target Server – it is the server component of iSCSI, which provides clients with access to block storage devices (in Windows, these are virtual VHDX disks).
  • iSCSI Initiator – The client part of the iSCSI protocol establishes a connection with the target, allowing access to the remote disk as as though it were connected locally.
  • IQN (iSCSI Qualified Name) – this is a unique identifier for the iSCSI device, which is used to identify both the targets and the initiators.

Install and Configure an iSCSI Target on Windows Server

A Windows Server host can act as an iSCSI target by sharing virtual disks and making them accessible to other servers (iSCSI initiators).

In order to enable an iSCSI target on a Windows Server host, which would provide access to its storage, the iSCSI Target Server role must be installed. It can be added via Server Manager -> File and Storage Services -> File and iSCSI Services.

server manager install iscsi target server role on windows server 2019

You can install the Windows Server role from PowerShell:

Install-WindowsFeature -Name FS-iSCSITarget-Server

Then create a virtual disk on your iSCSI target server. To do it, go to Server Manager -> File and Storage Services -> iSCSI and click New iSCSI Virtual Disk.

create iscsi virtual disk in Windows Server

Specify the local drive (or directory) where the virtual iSCSI disk file will be stored, and give it a name. When creating a new iSCSI disk, specify its size and type.

  • Fixed Size – a fixed-size disk that takes up all the allocated space immediately upon creation. This disk format provides better performance and is suitable for production environments with high disk activity and increased IOPS requirements.
  • Dynamically expanding – this disk initially occupies minimal space, expanding as more data is written to it. Although this type of disk saves storage space, it performs more slowly than fixed disks due to the overhead of constant extending.
  • Differencing – a differential disk is based on a parent disk and contains only the changes relative to that parent (is used rarely, typically in base image/VDI virtualization scenarios).

set iscsi virtual disk size

At the Access Servers step, specify which servers (iSCSI initiators) that will be able to connect to the iSCSI target by selecting one of the following connection options:

  • IQN (you will have to enable the iSCSI initiator on your server first and copy its IQN)
  • DNS Name
  • IP Address
  • MAC Address

Let’s use the IP address option.

add iscsi initiator by an ip address on windows server

At the next step, you can enable CHAP authentication to secure access to the iSCSI target. This will ensure that initiators can only connect to the iSCSI target after they have been authenticated using a username and password.

iscsi chap authentication

Check that the iscsiDisk2.vhdx virtual disk file has been created in the D:\iSCSIVirtualDisks directory (the default location).

You can create an iSCSI disk using PowerShell. Let’s create a 200 GB virtual disk:

New-IscsiVirtualDisk -Path D:\iSCSIVirtualDisks\iscsiDisk2.vhdx -Size 200GB

A 4,096 KB dynamic disk is created by default, regardless of the specified size. To create a fixed-size disk, add the -UseFixed option:

New-IscsiVirtualDisk -Path D:\iSCSIVirtualDisks\iscsiDisk2.vhdx -Size 200GB –UseFixed

create dynamic iscsi virtual disk file with New-IscsiVirtualDisk PowerShell cmdlet

Next, assign a name to the target and grant access to the initiator server’s IP address:

New-IscsiServerTarget -TargetName iscsiTarget33 -InitiatorIds "IQN:1991-05.com.microsoft:win2019test.ddd.com"

New-IscsiServerTarget

Rather than using an IP address, you can use an IQN to identify the iSCSI initiator.

New-IscsiServerTarget -TargetName iscsiTarget33 -InitiatorIds "IQN:1991-05.com.microsoft:win2019test.ddd.com"

To obtain the IQN on the iSCSI initiator host, use the command:

(Get-InitiatorPort).NodeAddress

Get-InitiatorPort NodeAddress

List the current iSCSI target settings.

Get-IscsiServerTarget | fl

List the iSCSI disks that are mapped to the target:

Get-IscsiServerTarget | Format-List TargetName, LunMappings

Get-IscsiServerTarget

Use the Get-IscsiTarget cmdlet to find the full name of the target, and then connect it.

Connect-IscsiTarget -NodeAddress iqn.1991-05.com.microsoft:win2019test-iscsitarget33-target

Connect-IscsiTarget node

Configure the iSCSI Initiator on Windows Server

The next step is to connect to the created iSCSI disk from the initiator server.  Go to Control Panel and start the iSCSI initiator applet (or run iscsicpl.execommand).

The iscsicpl graphical applet is available in the non-GUI editions of Windows Server (Windows Server Core and Windows Hyper-V Server).

start microsoft iscsi initiator service on windows server

When you first launch the iSCSI Initiator control panel, you will be prompted to start and configure the Microsoft iSCSI Initiator Service to run automatically.

start Microsoft iSCSI Initiator Service

Go to the Discovery tab, click Discover Portal and enter the IP address of the iSCSI target host.  By default, iSCSI uses all the available IP addresses to access the target. To ensure that only a specific network adapter is used for iSCSI traffic (it is recommended to dedicate a separate NIC for iSCSI traffic), click the Advanced button and change the default values in the drop-down lists accordingly: Local Adapter –> Microsoft iSCSI Initiator, Initiator IP –> 172.17.244.8.

discovery iscsi target on windows server

In order to connect to iSCSI storage, the firewall must allow traffic on TCP ports 860 and 3260.

Switch to the first Targets tab, where you will see a new connection. To enable it, click Connect -> Advanced, select values ​​from the drop-down lists, check the Enable CHAP log on option, and enter the username and password (which was set on the target). Make sure the Add the connection to the list of Favorite Targets option is enabled (enables automatic connection to the iSCSI target after reboot).

connect iscsi target on windows server initiator

The Enable multi-path option must be enabled if multiple network paths are available between the iSCSI initiator (client) and the iSCSI target (storage device). This will provide fault tolerance and load balancing by utilizing the MPIO (Multipath I/O) feature, as explained below.

The connection status should change to Connected.

iSCSI-Initiator connect target

Then initialize the iSCSI disk, which is initially in the Offline state. To do this, open the Disk Management console (diskmgmt.msc) on the initiator server and select Online -> Initialize Disk from the context menu of the new disk. Create one or more partitions on the new disk, then assign drive letters and labels to them. Format the volumes to NTFS.

bring iscsi drive online via disk management

This virtual disk, connected from a remote storage server via the iSCSI protocol, can now be used just like a locally attached drive.

Such a virtual iSCSI disk may be used in Windows Server to create a virtual RAM drive in the memory.

You can also use PowerShell to connect an iSCSI disk from the target to the initiator host.

Run the Microsoft iSCSI Initiator Service:

Start-Service -Name MSiSCSI

Set-Service -Name MSiSCSI -StartupType Automatic

Add an iSCSI target.

New-IscsiTargetPortal -TargetPortalAddress "192.168.15.10"

List the available iSCSI targets.

Get-IscsiTarget

Connect the required LUN from the target (using its NodeAddress) and enter the data for CHAP authentication (if used):

Connect-IscsiTarget -NodeAddress iqn.1991-05.com.microsoft:s-ms01-wsds-q1-target -AuthenticationType ONEWAYCHAP -ChapUsername "user1" -ChapSecret "Passw0rd1" -IsPersistent $true -IsMultipathEnabled $true

Connect-IscsiTarget with powershell

You can use the following PowerShell one-liner to quickly initialize and format your new disk (see an example in the article on disk and partition management with PowerShell):

Get-Disk |Where-Object PartitionStyle -eq 'RAW' |Initialize-Disk -PartitionStyle MBR -PassThru |New-Partition -AssignDriveLetter -UseMaximumSize |Format-Volume -FileSystem NTFS -Confirm:$false

Enable Multipathing (MPIO) with the iSCSI Initiator on Windows Server

To provide high availability and load balancing for connected iSCSI storage, you can use redundant network components, like network adapters and switches, in combination with an MPIO module. For example, both the storage device and the initiator have multiple network adapters that can be used as separate connection paths. Having multiple paths between the iSCSI target and initiator improves reliability by providing redundancy and balancing the load across the available connections.

The Multipath I/O (MPIO) feature must be installed on Windows Server to enable multipathing capabilities.

Enable-WindowsOptionalFeature -Online -FeatureName MultiPathIO

Open the MPIO management console:

mpiocpl.exe

Go to the Discover Multi-Paths tab, enable the Add support for iSCSI devices option, and click Add.

enable mpio for iscsi

Restart the server.

After enabling MPIO, add a SCSI target for the second (or subsequent) path (for example, using the second IP address of the iSCSI server) with the Enable multi-path option selected.

If you now click on the Device button on the Target tab, you will see that the same LUN is accessible via two (or more) different paths.

iscsi: list mpio devices

Click the MPIO button to configure the path selection policy.  The following options are available for the Load balance policy:

  • Round Robin – all possible paths are used in turn to balance the load (used by default)
  • Fail over only – only one (active) path is used, the others are in standby.
  • Round Robin with Subset – allows selecting several main paths (as in Round Robin) and several additional ones
  • Least Queue Depth – use the path with the lowest I/O queue depth.
  • Weighted Paths – a weight (priority) is assigned to each path. The path with the lowest weight is used.
  • Least Blocks – the path with the fewest data blocks transmitted is selected (distribute and balance load across all available paths)

select mpio load balance policy

Choose the MPIO path selection and load-balancing policy that is required by your environment.

iSCSI storage can be used to provide servers with additional disk space in a flexible way, and to build failover clusters when multiple servers require shared storage.

0 comment
4
Facebook Twitter Google + Pinterest
PowerShellWindows Server 2022Windows Server 2025
previous post
Check User Login History in Active Directory with PowerShell
next post
How to Rebuild (Reset) a Corrupted Icon Cache on Windows 10?

Related Reading

How to Manually Download and Install Windows Updates

July 11, 2025

Disks and Partitions Management with PowerShell on Windows

July 11, 2025

How to Reset Windows Update Settings to Default

July 29, 2025

Basic Commands to Configure Windows Server Core

September 5, 2025

Transfer/Seize FSMO Roles to Another Domain Controller in...

September 30, 2025

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • How to Delete a Windows Service via CMD or PowerShell

    October 16, 2025
  • Resource Fair Sharing in Windows Server Remote Desktop Services (RDS)

    October 6, 2025
  • How to Disable (Enable) Credential Guard in Windows 11

    October 6, 2025
  • Wrong Network Profile on Windows Server after Reboot

    September 30, 2025
  • How to Get Windows 10 Extended Security Updates After End-Of-Life

    September 24, 2025
  • Blocking NTLM Connections on Windows 11 and Windows Server 2025

    September 23, 2025
  • Windows Stucks at ‘Getting Windows Ready, Don’t Turn Off Computer’

    September 15, 2025
  • Clean Up ETL Log Files in ProgramData

    September 9, 2025
  • Fix: Slow Startup of PowerShell Console and Scripts

    September 3, 2025
  • DPI Scaling and Font Size in RDP (RDS) Session

    August 27, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)
  • How to Download Offline Installer (APPX/MSIX) for Microsoft Store App
  • Configuring Port Forwarding in Windows
  • Start Menu or Taskbar Search Not Working in Windows 10/11
  • Get-ADUser: Find Active Directory User Info with PowerShell
  • Adding Drivers into VMWare ESXi Installation Image
  • Tracking and Analyzing Remote Desktop Connection Logs in Windows
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top