New-SCStorageZone

Creates a zone in a zone set for a given fabric.

Syntax

New-SCStorageZone
   [-StorageZoneSet] <StorageZoneSet>
   -Name <String>
   [-Description <String>]
   [-AddZoneAlias <StorageZoneAlias[]>]
   [-AddZoneMembership <String[]>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [<CommonParameters>]

Description

The New-SCStorageZone cmdlet creates a zone in a zone set for a given fabric.

Examples

Example 1: Create a zone and commit it to the zone set

PS C:\> $ZoneSet = Get-SCStorageZoneSet -Name "ZoneSet01"
PS C:\> $Alias = Get-SCStorageZoneAlias -Name "MyArrayPorts"
PS C:\> $Members = @()
PS C:\> $Members += "D113ED3B8A310220"
PS C:\> $Members += "C003FF3B8A610000"
PS C:\> New-SCStorageZone -StorageZoneSet $ZoneSet -Name "MyZone" -Description "Zone for virtual machine host" -AddZoneAlias $Alias -AddZoneMembership $Members -ForceZoneSetActivation

The first command gets the zone set object named ZoneSet01, and then stores that object in the $ZoneSet variable.

The second command gets the storage zone alias named MyArrayPorts, and then stores that object in the $Alias variable.

The third command creates an array named $Members. The fourth and fifth commands populate the $Members array.

The final command creates a storage zone and commits the zone to the zone set stored in $ZoneSet.

Example 2: Create a zone without committing it to the zone set

PS C:\> $ZoneSet = Get-SCStorageZoneSet -Name "ZoneSet01"
PS C:\> $Members = @()
PS C:\> $Members += "D113ED3B8A310220"
PS C:\> $Members += "C003FF3B8A610000"
PS C:\> New-SCStorageZone -StorageZoneSet $ZoneSet -Name "MyZone" -Description "Zone for virtual machine host" -AddZoneMembership $Members

The first command gets the zone set object named ZoneSet01, and then stores that object in the $ZoneSet variable.

The second command creates an array named $members. The third and fourth commands populate the $Members array.

The last command creates a storage zone without committing it to the zone set.

Parameters

-AddZoneAlias

Specifies an array of zone aliases that represents one or more world-wide port names. To obtain a StorageZoneAlias object, use the Get-SCStorageZoneAlias cmdlet.

Type:StorageZoneAlias[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-AddZoneMembership

Specifies an array of zone members for this cmdlet to add.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specifies a description of the storage zone.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-JobVariable

Specifies the name of a variable that you use to track and store job progress.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name of the new storage zone.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-StorageZoneSet

Specifies a storage zone set object. To obtain a StorageZoneSet object, use the Get-SCStorageZoneSet cmdlet.

Type:StorageZoneSet
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

Outputs

StorageZone

This cmdlet returns a StorageZone object.