PowerShell Logo Small

New-MaskingSet



This is the built-in help made by Microsoft for the command 'New-MaskingSet', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates a new masking set.

SYNTAX


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



Search powershellhelp.space

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.



<

RELATED LINKS

Get-MaskingSet
Get-InitiatorPort
Get-StorageSubsystem
Get-TargetPort
Get-VirtualDisk
Remove-MaskingSet
Rename-MaskingSet

REMARKS

<

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.