Skip to content

Instantly share code, notes, and snippets.

@PlagueHO
Created December 16, 2015 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PlagueHO/a5aeabe9928fa130ca08 to your computer and use it in GitHub Desktop.
Save PlagueHO/a5aeabe9928fa130ca08 to your computer and use it in GitHub Desktop.
Example DSC Configuration of an iSCSI Target
configuration Sample_ciSCSIInitiator
{
Param
(
[String] $NodeName = 'LocalHost'
)
Import-DscResource -Module ciSCSI
Node $NodeName
{
Service iSCSIService
{
Name = 'MSiSCSI'
StartupType = 'Automatic'
State = 'Running'
}
ciSCSITargetPortal iSCSITargetPortal
{
Ensure = 'Present'
TargetPortalAddress = '192.168.128.10'
InitiatorPortalAddress = '192.168.128.20'
DependsOn = "[WindowsFeature]iSCSIService"
} # End of ciSCSITargetPortal Resource
ciSCSITarget iSCSITarget
{
Ensure = 'Present'
NodeAddress = 'iqn.1991-05.com.microsoft:fileserver01-cluster-target'
TargetPortalAddress = '192.168.128.10'
InitiatorPortalAddress = '192.168.128.20'
IsPersistent = $true
DependsOn = "[ciSCSITargetPortal]iSCSITargetPortal"
} # End of ciSCSITarget Resource
} # End of Node
} # End of Configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment