New-MaskingSet
Creates a new masking set.
New-MaskingSet
[-StorageSubSystemFriendlyName] <String[]>
[-AsJob]
[-CimSession <CimSession[]>]
[-DeviceAccesses <DeviceAccess[]>]
[-DeviceNumbers <String[]>]
[-FriendlyName <String>]
[-HostType <HostMode>]
[-InitiatorAddresses <String[]>]
[-TargetPortAddresses <String[]>]
[-ThrottleLimit <Int32>]
[-VirtualDiskNames <String[]>]
New-MaskingSet
[-AsJob]
[-CimSession <CimSession[]>]
[-DeviceAccesses <DeviceAccess[]>]
[-DeviceNumbers <String[]>]
[-FriendlyName <String>]
[-HostType <HostMode>]
[-InitiatorAddresses <String[]>]
[-TargetPortAddresses <String[]>]
[-ThrottleLimit <Int32>]
[-VirtualDiskNames <String[]>]
-StorageSubSystemUniqueId <String[]>
New-MaskingSet
[-AsJob]
[-DeviceAccesses <DeviceAccess[]>]
[-DeviceNumbers <String[]>]
[-FriendlyName <String>]
[-HostType <HostMode>]
[-InitiatorAddresses <String[]>]
[-TargetPortAddresses <String[]>]
[-ThrottleLimit <Int32>]
[-VirtualDiskNames <String[]>]
-InputObject <CimInstance[]>
New-MaskingSet
[-AsJob]
[-CimSession <CimSession[]>]
[-DeviceAccesses <DeviceAccess[]>]
[-DeviceNumbers <String[]>]
[-FriendlyName <String>]
[-HostType <HostMode>]
[-InitiatorAddresses <String[]>]
[-TargetPortAddresses <String[]>]
[-ThrottleLimit <Int32>]
[-VirtualDiskNames <String[]>]
-StorageSubSystemName <String[]>
New-MaskingSet
[-CimSession <CimSession[]>]
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
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.
ps_cimcommon_asjob
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227967 or Get-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227966 cmdlet. The default is the current session on the local computer.
Type: | CimSession[] |
Aliases: | Session |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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
Type: | DeviceAccess[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the device numbers for one or more virtual disks. Some storage providers do not use device numbers.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the friendly name for the new masking set.
Type: | String |
Aliases: | MaskingSetFriendlyName |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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.
Type: | HostMode |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the initiator addresses.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Accepts a StorageSubsystem object from the pipeline as input. Enter a StorageSubsystem CIM object, which is returned by the Get-StorageSubSystem cmdlet.
Type: | CimInstance[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the friendly name of the storage subsystem.
Type: | String[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of the storage subsystem provided by the Storage Management.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the UniqueID of the storage subsystem to use.
Type: | String[] |
Aliases: | StorageSubsystemId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies one or more target port addresses.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies one or more virtual disk names to include in the masking set.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
You can pipe a StorageSubsystem object to the InputObject parameter.
This cmdlet outputs an object representing the newly created masking set.