This is the built-in help made by Microsoft for the command 'Add-TargetPortToMaskingSet', 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.
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.
Add-TargetPortToMaskingSet [-MaskingSetFriendlyName] <String[]> [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-PassThru
[<SwitchParameter>]] [-TargetPortAddresses <String[]>] [-ThrottleLimit <Int32>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
[<CommonParameters>]
Add-TargetPortToMaskingSet [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-PassThru [<SwitchParameter>]] [-TargetPortAddresses
<String[]>] [-ThrottleLimit <Int32>] -MaskingSetUniqueId <String[]> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
[<CommonParameters>]
Add-TargetPortToMaskingSet [-AsJob [<SwitchParameter>]] [-CimSession <CimSession[]>] [-PassThru [<SwitchParameter>]] [-TargetPortAddresses
<String[]>] [-ThrottleLimit <Int32>] -InputObject <CimInstance[]> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
[<CommonParameters>]
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.
<
Get-MaskingSet
Get-TargetPort
New-MaskingSet
<
Example 1: Add a target port
PS C:\> $TargetPortObject = Get-TargetPort
PS C:\> $subSystem = Get-StorageSubSystem SANArray1
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.