Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Add-InitiatorIdToMaskingSet

Add-InitiatorIdToMaskingSet

maskingset.cdxml

Synopsis

Adds an initiator ID to an existing masking set, granting the host associated with the initiator ID access to the virtual disk and target port resources defined in the masking set.

Syntax

Add-InitiatorIdToMaskingSet [-MaskingSetFriendlyName] [-AsJob] [-CimSession] [-HostType] [-InitiatorIds] [-PassThru] [-ThrottleLimit] [-Confirm] [-WhatIf] [<CommonParameters>]

Add-InitiatorIdToMaskingSet [-AsJob] [-CimSession] [-HostType] [-InitiatorIds] [-PassThru] [-ThrottleLimit] [-MaskingSetUniqueId] [-Confirm] [-WhatIf] [<CommonParameters>]

Add-InitiatorIdToMaskingSet [-AsJob] [-CimSession] [-HostType] [-InitiatorIds] [-PassThru] [-ThrottleLimit] [-InputObject] [-Confirm] [-WhatIf] [<CommonParameters>]

Detailed Description

The Add-InitiatorIdToMaskingSet cmdlet adds an initiator ID to an existing masking set, granting the host associated with the initiator ID access to the virtual disk and target port resources defined in the masking set.

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

Parameters

-AsJob <SwitchParameter>

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-CimSession <CimSession[]>

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-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Aliases

Session

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-HostType <HostType>

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.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-InitiatorIds <String[]>

Specifies one or more initiator IDs on which this cmdlet acts. The initiator IDs will be added to this masking set. Note: The initiator IDs do not need to be displayed in the output of the Get-InitiatorId cmdlet to be added to a masking set.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-InputObject <CimInstance[]>

Accepts a MaskingSet object from the pipeline as input.

Aliases

None

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByValue)

Accept wildcard characters?

false

-MaskingSetFriendlyName <String[]>

Specifies the friendly name of the masking set to which you want to add an initiator ID.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-MaskingSetUniqueId <String[]>

Specifies the unique ID of the masking set to which you want to add an initiator ID.

Aliases

Id

Required?

true

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-PassThru <SwitchParameter>

Specifies that the cmdlet should output an object representing the masking setto which it added an initiator ID. By default, this cmdlet does not generate any output.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-ThrottleLimit <Int32>

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.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Confirm <SwitchParameter>

Prompts you for confirmation before running the cmdlet.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

-WhatIf <SwitchParameter>

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Aliases

None

Required?

false

Position

named

Default value

false

Accept pipeline input?

false

Accept wildcard characters?

false

Input Type

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet

Return Type

Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/Storage/MSFT_MaskingSet

Notes

None

Examples

Example 1: Adding an InitiatorID to a masking set by masking set object

This example shows getting Fibre Channel initiator ports from the Srv1 computer, then getting the masking set object for the Cluster1MaskingSet, then enabling Srv1 access to all virtual disks defined in the masking set.

PS C:\> $fcPorts = Get-InitiatorPort -CimSession Srv1 -ConnectionType FibreChannel
PS C:\> $maskingSet = Get-MaskingSet Cluster1MaskingSet
PS C:\> $fcPorts.NodeAddress 2000001b328d33cd2001001b32ad33cd
PS C:\> $maskingSet | Add-InitiatorIdToMaskingSet -InitiatorIds $fcPorts.NodeAddress

Online Version
Get-InitiatorID
Get-InitiatorPort