Connect iSCSI Targets with MutualCHAP Authentication using PowerShell

You can connect iSCSI Targets in Windows using PowerShell which is a handy technique for volumes which are encrypted with authentication; As these volumes will not automatically connect at system startup, even if they are within iSCSI Initiator’s Favorite Targets.

You can create a PowerShell script and configure in Task Scheduler to automatically connect iSCSI Targets at System Startup.

Connect-IscsiTarget -NodeAddress iqn.1994-02.com.amazon:fil01-volume1 -ChapUsername "iqn.1991-05.com.microsoft:serverfil01.domain.local" -ChapSecret Secret@1 -AuthenticationType MUTUALCHAP

Note the uppercase MUTUALCHAP string, this is important as it is case sensitive and will fail if not complied.