Replicate igroup Information from Old Controller to New (7-Mode)

As much as I would like to exclusively be working with Clustered Data ONTAP, there are still times where I need to work with 7-Mode. As many storage admin and consultants know, hardware refreshes can be quite time consuming. This is a quick and dirty script I wrote to save some time recreating Initiator Groups on a new 7-Mode storage system. Modify the first two lines with the source and target controllers and go. The script isn’t very complex, but it sure can save a ton of time.


$SourceController = "sourceIPHostname"
$TargetController = "targetIPHostname"

Connect-NaController $SourceController

$Igroups = Get-NaIgroup

Connect-NaController $TargetController

$Igroups | New-NaIgroup

ForEach($Igroup in $Igroups) {
	$Initiators = $Igroup.Initiators
	ForEach($Initiator in $Initiators) {
		Add-NaIgroupInitiator $Igroup $Initiator
	}
}

Leave a Reply

You must be logged in to post a comment.