Today, we will learn how to install and configure the iSCSI Target & Initiator on Windows Server 2022. But before that, we need to know what iSCSI is!
What is iSCSI?
Internet Small Computer System Interface commonly abbreviated as iSCSI is a storage networking protocol that makes it possible to transmit SCSI (Small Computer System Interface) over TCP/IP networks. This is to mean that iSCSI enables the use of block-level storage over Ethernet networks, allowing a server to access storage devices as if they were locally attached, even if the storage devices are physically located in a different location. This can be beneficial for storage consolidation, disaster recovery, and virtualization. IBM is credited with originating the concept of iSCSI in 1998. The initial version of the protocol was proposed to the Internet Engineering Task Force (IETF) in 2000.
iSCSI works by encapsulating SCSI commands and data into IP packets for transmission over TCP/IP networks, allowing SCSI storage devices to be accessed over standard Ethernet connections. In iSCSI, packets are transmitted over a point-to-point connection and are then disassembled upon arrival. Once disassembled, the system can read the commands contained within the packets. This allows the shared storage to be seen as if it were locally mounted, and the shared block storage can include a range of options such as LVM partitions, HDD/SSD partitions, or other block files.
Normally, iSCSI works with the client-server model:
- iSCSI target: To enable access to the storage resources, iSCSI requires a server setup that includes one or more NICs (network interface cards), HBAs (host bus adapters), or iSOEs (iSCSI offload engines). These components work together to create the necessary connection between the server and the storage resources.
- iSCSI initiator: This is the client tool that makes it possible to send and receive the packets from the iSCSI target.
The below image can be used to understand the iSCSI architecture:

Install iSCSI Target on Windows Server 2022
We will begin by installing the iSCSI Target on Windows Server 2022. To achieve this, you can use any of the two options below:
- GUI
- PowerShell
Method 1: Install iSCSI Target on Windows Server 2022 using GUI
To install the iSCSI Target on Windows Server 2022 using GUI, launch the server manager and click Add roles and features

Select role-based or feature-based installation

Select the destination server:

In the features tab, select the iSCSI Target then, Add Features button.

Once the installation is complete, close and proceed to the configuration.

Method 2: Install iSCSI Target on Windows Server 2022 using PowerShell
You can also install the iSCSI Target on your Windows Server 2022 using PowerShell. First, launch PowerShell with admin privileges then run the below command:
Install-WindowsFeature FS-iSCSITarget-Server -IncludeManagementTools
Sample Output:

Configure iSCSI Target on Windows Server 2022
Similar to installing, you can configure the iSCSI Target on Windows Server 2022 using both the GUI and the PowerShell. Follow any of the below methods to configure the iSCSI Target on Windows Server 2022.
Method 1: Configure iSCSI Target on Windows Server 2022 using GUI
On the server manager, click File and Storage Services. On the left pane, click on Tasks and select New iSCSI Virtual Disk.

On this tab, you are required to specify the name of the server and volume. For this guide, we have a disk/directory created on path C:iSCSIstorage

Set the name of your iSCSI virtual disk.

Specify the disk size of the virtual disk

Next, create a new iSCSI Target for the disk.

Set the name for the iSCSI Target.

Next, specify the initiators that are allowed to connect to the Target.

On this page, click add. You can provide the IP address of the initiator.

Configure the authentication to be used. For this example, we will use the CHAP method. Configure the username and password to be used when connecting to the iSCSI Target.

Now create the iSCSI Target.

Once complete, close the window. You will have a new disk created as shown:

Method 2: Configure iSCSI Target on Windows Server 2022 using PowerShell
All the above configurations can still be performed from the PowerShell. Launch PowerShell with elevated privileges and execute the below command to create an iSCSI Target.
New-IscsiServerTarget -TargetName "iscsiTarget01" -InitiatorId @("IPAddress:192.168.200.66","IPAddress:192.168.200.55")
The above command provides the iSCSI Target name and the Initiator IP addresses for example 192.168.200.66 and 192.168.200.55.
Next, create a virtual disk by specifying the PATH and disk size :
New-IscsiVirtualDisk -Path "C:\iSCSIstorage\Disk01.vhdx" -SizeBytes 10GB
Next, assign the disk to the SCSI Target created earlier:
Add-IscsiVirtualDiskTargetMapping -TargetName "iscsiTarget01" -Path "C:\iSCSIstorage\Disk01.vhdx"
Enable and configure the authentication method.:
Set-IscsiServerTarget `
-TargetName "iscsiTarget01" `
-EnableChap $True `
-Chap (New-Object PSCredential("windows", (ConvertTo-SecureString -AsPlainText "StrongPassw0rd!" -Force)))`
-PassThru
View and confirm the made settings:
Get-IscsiServerTarget -TargetName "iscsiTarget01"
Sample Output:

For the changes to apply, restart the service:
Restart-Service -Name WinTarget
Configure the iSCSI Initiator on Windows Server 2022
The iSCSI Initiator is the client tool to connect and use the virtual disk on the iSCSI Target. There are two ways of installing and configuring the iSCSI Initiator on Windows Server 2022.
The two methods are:
- Using GUI
- Using PowerShell
Method 1: Configure the iSCSI Initiator on Windows Server 2022 using GUI
On the selected server as the iSCSI Initiator, launch the server manager and open tools. Here select the iSCSI Initiator

Start the service:

Provide the iSCSI Target’s IP address or hostname on this page and click Quick Connect.

You will see the Target detected as shown, click done and proceed

Now click on the connect to the Target:

On the below page, click on Advanced options

On this page, enable the CHAP authentication, and provide the username and password as configured:

Finally, click the OK button.

The status will change to connected.

Open the Disks, you will see the new iSCSI virtual disk.

Now right-click and bring the disk on

Next, initialize the disk.

Create a new volume on the disk.

Follow through the process and assign a drive letter to it.

You also need to provide a name for the disk.

Once a volume has been created, the disk will now appear as shown:

Method 2: Configure the iSCSI Initiator on Windows Server 2022 using PowerShell
You can also configure the iSCSI Initiator from the PowerShell. Follow the below steps after launching PowerShell with admin permissions.
First, start the service:
Start-Service -Name MSiSCSI
Provide the iSCSI Target IP address/hostname:
Set-Service -Name MSiSCSI -StartupType Automatic
Connect to the Target:
New-IscsiTargetPortal -TargetPortalAddress "192.168.200.65"
Get the Target information:
Get-IscsiTarget
Sample Output:

From the above output, the connection status is still false. For the connection to be successful, we need to add authentication.
Connect-IscsiTarget `
-NodeAddress iqn.1991-05.com.microsoft:rx-7-iscsitarget01-target `
-AuthenticationType ONEWAYCHAP `
-ChapUsername "windows" `
-ChapSecret "StrongPassw0rd!" `
-IsPersistent $True
View the connection:
Get-IscsiConnection
Sample Output:

Now view if the iSCSI disk is available:
Get-Disk | Format-Table -AutoSize -Wrap
Sample Output:

Enable read/write on the iSCSI disk. For this case, it is assigned number 1
Set-Disk -Number 1 -IsOffline $False
Initialize the disk:
Initialize-Disk -Number 1 -PartitionStyle GPT
Confirm the made changes:
Get-Disk | Format-Table -AutoSize -Wrap
Now assign a drive letter to the disk:
New-Partition -DiskNumber 1 -UseMaximumSize -AssignDriveLetter
Format the disk to NTFS:
Format-Volume -DriveLetter E -FileSystem NTFS -Force
Confirm the changes
Get-Volume | Format-Table -AutoSize -Wrap
Sample Output:

The end!
This guide has provided the required knowledge on configuring iSCSI Target & Initiator on Windows Server 2022. Now you are set to use iSCSI on Windows Server 2022 as desired. I hope this was insightful.
See more:
- Configure iSCSI Target and Initiator on Rocky Linux 8|AlmaLinux 8
- How To Configure iSCSI Initiator on CentOS 8 / RHEL 8
- Configure iSCSI Initiator on Windows Server 2019