Edit

Share via


New-MaskingSet

Creates a new masking set.

Syntax

ByFriendlyName (Default)

New-MaskingSet
    [-StorageSubSystemFriendlyName] <String[]>
    [-FriendlyName <String>]
    [-VirtualDiskNames <String[]>]
    [-InitiatorAddresses <String[]>]
    [-TargetPortAddresses <String[]>]
    [-DeviceNumbers <String[]>]
    [-DeviceAccesses <DeviceAccess[]>]
    [-HostType <HostMode>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByUniqueId

New-MaskingSet
    -StorageSubSystemUniqueId <String[]>
    [-FriendlyName <String>]
    [-VirtualDiskNames <String[]>]
    [-InitiatorAddresses <String[]>]
    [-TargetPortAddresses <String[]>]
    [-DeviceNumbers <String[]>]
    [-DeviceAccesses <DeviceAccess[]>]
    [-HostType <HostMode>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

ByName

New-MaskingSet
    -StorageSubSystemName <String[]>
    [-FriendlyName <String>]
    [-VirtualDiskNames <String[]>]
    [-InitiatorAddresses <String[]>]
    [-TargetPortAddresses <String[]>]
    [-DeviceNumbers <String[]>]
    [-DeviceAccesses <DeviceAccess[]>]
    [-HostType <HostMode>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

InputObject (cdxml)

New-MaskingSet
    -InputObject <CimInstance[]>
    [-FriendlyName <String>]
    [-VirtualDiskNames <String[]>]
    [-InitiatorAddresses <String[]>]
    [-TargetPortAddresses <String[]>]
    [-DeviceNumbers <String[]>]
    [-DeviceAccesses <DeviceAccess[]>]
    [-HostType <HostMode>]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [<CommonParameters>]

Description

The New-MaskingSet cmdlet creates a new masking set. Masking sets allow management of groups of TargetPort, VirtualDisk, and InitiatorID objects to manage access to virtual disks, either for individual computers or multiple computers in the case of a Failover Cluster configuration. Once a masking set is created, adding or removing a virtual disk grants or removes access to all resources in the masking set. Adding or removing initiator addresses can show or hide the virtual disks in this masking set to hosts.

ps_storage_spacesubsystem_not_remark

Examples

Example 1: Create a masking set

PS C:\> $StorageSubsystem = Get-StorageSubsystem
PS C:\> $VirtualDisks = Get-VirtualDisk -Name "Virtual01,Virtual02"
PS C:\> $Initiator = Get-InitiatorPort
PS C:\> $Target = Get-TargetPort
PS C:\> New-MaskingSet -StorageSubsystemFriendlyName $StorageSubsystem.FriendlyName -VirtualDiskNames $VirtualDisks.Name -FriendlyName "MyFirstMaskingSet" -InitiatorAddresses $Initiator.NodeAddress -TargetPortAddresses $Target.PortAddress

This example collects the necessary information and then creating a new masking set to expose the virtual disks that have the friendly names VirtualDisk01 and VirtualDisk02 to the local machine.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

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

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

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

-DeviceAccesses

Specifies the way in which initiators can access the virtual disk(s) that are part of this masking set. You must specify a DeviceAccesses value for each virtual disk specified by the VirtualDiskNames parameter. Allowed values are NoAccess, ReadOnly, ReadWrite, and Unknown.

Parameter properties

Type:

DeviceAccess[]

Default value:None
Accepted values:Unknown, ReadWrite, ReadOnly, NoAccess
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

-DeviceNumbers

Specifies the device numbers for one or more virtual disks. Some storage providers do not use device numbers.

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

-FriendlyName

Specifies the friendly name for the new masking set.

Parameter properties

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

Parameter sets

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

-HostType

Specifies the host operating system or other host environmental factors that may influence the behavior that the storage system should have when showing a virtual disk to an initiator.

Parameter properties

Type:HostMode
Default value:None
Accepted values:Unknown, Other, Standard, Solaris, HPUX, OpenVMS, Tru64, Netware, Sequent, AIX, DGUX, Dynix, Irix, CiscoISCSIStorageRouter, Linux, MicrosoftWindows, OS400, TRESPASS, HIUX, VMwareESXi, MicrosoftWindowsServer2008, MicrosoftWindowsServer2003
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

-InitiatorAddresses

Specifies the initiator addresses.

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

-InputObject

Specifies the input object that is used in a pipeline command.

Parameter properties

Type:

CimInstance[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputObject (cdxml)
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-StorageSubSystemFriendlyName

Specifies the friendly name of the storage subsystem.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByFriendlyName
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-StorageSubSystemName

Specifies the name of the storage subsystem provided by the Storage Management.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ByName
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-StorageSubSystemUniqueId

Specifies the UniqueID of the storage subsystem to use.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:StorageSubsystemId

Parameter sets

ByUniqueId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-TargetPortAddresses

Specifies one or more target port addresses.

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

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Parameter properties

Type:Int32
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

-VirtualDiskNames

Specifies one or more virtual disk names to include in the masking set.

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

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.

Inputs

CimInstance

You can pipe a StorageSubsystem object to the InputObject parameter.

Outputs

CimInstance

This cmdlet outputs an object representing the newly created masking set.

Notes

  • When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all servers in the cluster).