Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

New-MaskingSet

Windows Server 2012 R2 and Windows 8.1

Updated: April 10, 2014

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

New-MaskingSet

Creates a new masking set.

Syntax

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

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

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

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




Detailed 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.

This cmdlet is not needed when using the Storage Spaces subsystem.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CimSession<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.


Aliases

Session

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DeviceAccesses<DeviceAccess[]>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DeviceNumbers<String[]>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FriendlyName<String>

Specifies the friendly name for the new masking set.


Aliases

MaskingSetFriendlyName

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-HostType<HostMode>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InitiatorAddresses<String[]>

Specifies the initiator addresses.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InputObject<CimInstance[]>

Accepts a StorageSubsystem object from the pipeline as input. Enter a StorageSubsystem CIM object, which is returned by the Get-StorageSubSystem cmdlet.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-StorageSubSystemFriendlyName<String[]>

Specifies the friendly name of the storage subsystem.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-StorageSubSystemName<String[]>

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


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-StorageSubSystemUniqueId<String[]>

Specifies the UniqueID of the storage subsystem to use.


Aliases

StorageSubsystemId

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-TargetPortAddresses<String[]>

Specifies one or more target port addresses.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

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.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VirtualDiskNames<String[]>

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


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Notes

  • The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

Examples

Example 1: Create a masking set

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.


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

Related topics

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.