PowerShell Logo Small

Add-TargetPortToMaskingSet



This is the built-in help made by Microsoft for the command 'Add-TargetPortToMaskingSet', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 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

Adds one or more target ports to a specified masking set, allowing a connection between the target ports, and any virtual disks and initiator IDs that the masking set contains.

SYNTAX


Add-TargetPortToMaskingSet [-MaskingSetFriendlyName] <String[]> [-AsJob] [-CimSession <CimSession[]>] [-PassThru] [-TargetPortAddresses <String[]>] [-ThrottleLimit <Int32>]
[-Confirm] [-WhatIf] [<CommonParameters>]
Add-TargetPortToMaskingSet [-AsJob] [-CimSession <CimSession[]>] [-PassThru] [-TargetPortAddresses <String[]>] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]>
[-Confirm] [-WhatIf] [<CommonParameters>]
Add-TargetPortToMaskingSet [-AsJob] [-CimSession <CimSession[]>] [-PassThru] [-TargetPortAddresses <String[]>] [-ThrottleLimit <Int32>] -MaskingSetUniqueId <String[]>
[-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Add-TargetPortToMaskingSet cmdlet adds one or more target ports to a specified masking set, allowing a connection between the target ports, and any virtual disks and
initiator IDs that the masking set contains. All target ports must use the same connection type (for example iSCSI or Fibre Channel).


Note: This cmdlet works only on storage subsystems that support multi-port per view selection (MaskingPortsPerView = 3). To view the MaskingPortsPerView property, type the
following cmdlets: Get-StorageSubSystem | Format-Table -Property FriendlyName, MaskingPortsPerView


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



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkID=294422
Get-MaskingSet
Get-TargetPort
New-MaskingSet

REMARKS

<

Examples


Example 1: Add a target port

PS C:\> $TargetPortObject = Get-TargetPort
PS C:\> $subSystem = Get-StorageSubSystem SANArray1
PS C:\> $maskingSet = Get-MaskingSet "Cluster1MaskingSet"
PS C:\> $subSystem | Get-TargetPort | Where-Object ConnectionType -eq "Fibre Channel" | Format-Table -AutoSize FriendlyName, PortAddress

FriendlyName          PortAddress
------------          -----------
Stor1_FCTargetPort.0a 500A098387995A75
Stor1_FCTargetPort.0b 500A098487995A75
Stor1_FCTargetPort.0c 500A098187995A75
Stor1_FCTargetPort.0d 500A098287995A75


PS C:\> $maskingSet | Add-TargetPortToMaskingSet -TargetPortAddresses "500A098187995A75"



This example demonstrates enumerating the Fibre Channel target ports on a given storage subsystem, and adding one of the target ports to an existing masking set.