共用方式為


New-SCStorageZone

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

Syntax

Default (Default)

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.

Parameter properties

Type:

StorageZoneAlias[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-AddZoneMembership

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

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Description

Specifies a description of the storage zone.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobVariable

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the new storage zone.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RunAsynchronously

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-StorageZoneSet

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

Parameter properties

Type:StorageZoneSet
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

StorageZone

This cmdlet returns a StorageZone object.