PowerShell Logo Small

New-MaskingSet



This is the built-in help made by Microsoft for the command 'New-MaskingSet', in PowerShell version 4 - as retrieved from Windows version 'Microsoft Windows 8.1 Enterprise' 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] [-CimSession <CimSession[]>] [-DeviceAccesses <DeviceAccess[]>] [-DeviceNumbers <String[]>] [-Frien
dlyName <String>] [-HostType <HostMode>] [-InitiatorAddresses <String[]>] [-TargetPortAddresses <String[]>] [-ThrottleLimit <Int32>] [-VirtualDiskNames <String[]>] [<
CommonParameters>]
New-MaskingSet [-AsJob] [-CimSession <CimSession[]>] [-DeviceAccesses <DeviceAccess[]>] [-DeviceNumbers <String[]>] [-FriendlyName <String>] [-HostType <HostMode>] [-
InitiatorAddresses <String[]>] [-TargetPortAddresses <String[]>] [-ThrottleLimit <Int32>] [-VirtualDiskNames <String[]>] -StorageSubSystemUniqueId <String[]> [<Common
Parameters>]
New-MaskingSet [-AsJob] [-CimSession <CimSession[]>] [-DeviceAccesses <DeviceAccess[]>] [-DeviceNumbers <String[]>] [-FriendlyName <String>] [-HostType <HostMode>] [-
InitiatorAddresses <String[]>] [-TargetPortAddresses <String[]>] [-ThrottleLimit <Int32>] [-VirtualDiskNames <String[]>] -StorageSubSystemName <String[]> [<CommonPara
meters>]
New-MaskingSet [-AsJob] [-CimSession <CimSession[]>] [-DeviceAccesses <DeviceAccess[]>] [-DeviceNumbers <String[]>] [-FriendlyName <String>] [-HostType <HostMode>] [-
InitiatorAddresses <String[]>] [-TargetPortAddresses <String[]>] [-ThrottleLimit <Int32>] [-VirtualDiskNames <String[]>] -InputObject <CimInstance[]> [<CommonParamete
rs>]



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 v
irtual 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 maskin
g set to hosts.


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



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=307003
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" -InitiatorA
ddresses $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 Virtual
Disk02 to the local machine.