en-US/about_iSCSIServerTarget.help.txt
.NAME
iSCSIServerTarget # Description This resource is used to create or remove Virtual Disks for use by iSCSI Targets. .PARAMETER TargetName Key - String Specifies the name of the iSCSI target. .PARAMETER Ensure Write - String Allowed values: Present, Absent Ensures that Server Target is either Absent or Present. .PARAMETER InitiatorIds Required - String Specifies the iSCSI initiator identifiers (IDs) to which the iSCSI target is assigned. .PARAMETER Paths Required - String Specifies the path of the virtual hard disk (VHD) files that are associated with the Server Target. .PARAMETER iSNSServer Write - String Specifies the name of an iSNS Server to register this Server Target with. .EXAMPLE This example installs the iSCSI Target Server, creates two iSCSI Virtal Disks and then a new iSCSI Target called Cluster with the two Virtual Disks assigned. The iSCSI target will accept connections from cluster01.contoso.com, cluster02.contoso.com or cluster03.contoso.com. Configuration Example { param ( [Parameter()] [System.String[]] $NodeName = 'localhost' ) Import-DscResource -Module iSCSIDsc Node $NodeName { WindowsFeature iSCSITargetServerInstall { Ensure = "Present" Name = "FS-iSCSITarget-Server" } iSCSIVirtualDisk iSCSIClusterVDisk01 { Ensure = 'Present' Path = 'D:\iSCSIVirtualDisks\ClusterVdisk01.vhdx' DiskType = 'Dynamic' SizeBytes = 20GB Description = 'Cluster Virtual Disk 01' DependsOn = "[WindowsFeature]ISCSITargetServerInstall" } # End of iSCSIVirtualDisk Resource iSCSIVirtualDisk iSCSIClusterVDisk02 { Ensure = 'Present' Path = 'D:\iSCSIVirtualDisks\ClusterVdisk02.vhdx' DiskType = 'Dynamic' SizeBytes = 10GB Description = 'Cluster Virtual Disk 02' DependsOn = "[WindowsFeature]ISCSITargetServerInstall" } # End of iSCSIVirtualDisk Resource iSCSIServerTarget iSCSIClusterTarget { Ensure = 'Present' TargetName = 'Cluster' InitiatorIds = 'iqn.1991-05.com.microsoft:cluster01.contoso.com','iqn.1991-05.com.microsoft:cluster02.contoso.com','iqn.1991-05.com.microsoft:cluster03.contoso.com' Paths = 'D:\iSCSIVirtualDisks\ClusterVdisk01.vhdx','D:\iSCSIVirtualDisks\ClusterVdisk02.vhdx' iSNSServer = 'isns.contoso.com' DependsOn = "[iSCSIVirtualDisk]iSCSIClusterVDisk01","[iSCSIVirtualDisk]iSCSIClusterVDisk01" } # End of iSCSIServerTarget Resource } # End of Node } # End of Configuration |