Using an iSCSI target
Windows provides a built-in iSCSI client component you use the Connect-IscsiTarget
command to connect the iSCSI client to the iSCSI server and start using the disk as if it were attached locally.
Getting ready
This recipe uses SRV1
, a domain-joined host in the Reskit.Org
domain, on which you have installed PowerShell 7 and VS Code. You also use SS1
and should have DC1
online. You previously created an iSCSI target (on SS1
), and now you use the built-in iSCSI initiator to access the iSCSI disk. You run this recipe on SRV1
.
How to do it...
- Adjusting the iSCSI service to auto-start, then starting the service
Set-Service MSiSCSI -StartupType 'Automatic' Start-Service MSiSCSI
- Setting up the portal toÂ
SS1
$PHT = @{   TargetPortalAddress     = 'SS1.Reskit.Org&apos...