New-IscsiServerTarget
Creates a new iSCSI Target object with the specified name.
Syntax
Default (Default)
New-IscsiServerTarget
[-TargetName] <String>
[-InitiatorIds <InitiatorId[]>]
[-ClusterGroupName <String>]
[-ComputerName <String>]
[-Credential <PSCredential>]
[<CommonParameters>]
Description
The New-IscsiServerTarget cmdlet creates an iSCSI Target object that has the specified name. After creating an iSCSI Target object, the target can be assigned to an iSCSI initiator, and a virtual disk can be associated with the target.
Examples
Example 1: Create a target on the local server
PS C:\> New-IscsiServerTarget -TargetName "T1"
This example creates a target named T1 on the local server.
Example 2: Create a target and assign initiators
PS C:\> New-IscsiServerTarget -TargetName "T1" -InitiatorId @("IPAddress:10.10.1.1","IPAddress:10.10.1.2")
This example creates a target with the name T1 and assigns it to two initiators, with IP addresses 10.10.1.1 and 10.10.1.2.
Example 3: Create a target on a cluster
PS C:\> New-IscsiServerTarget -TargetName "T1" -ComputerName "fscluster.contoso.com" -ClusterGroupName "Group1"
This example creates a target with the name T1 in the cluster group named Group1 on the cluster named fscluster.contoso.com.
Parameters
-ClusterGroupName
Specifies the name of the resource group or network in the resource group on which this cmdlet should be run.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ComputerName
Specifies the computer name, or IP address, of the remote computer, if this cmdlet is run on a remote computer.
Specifies the cluster resource group network name, or cluster node name, if this cmdlet is run on a cluster configuration.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Credential
Specifies the credentials when connecting to a remote computer.
Parameter properties
Type: | PSCredential |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-InitiatorIds
Specifies the iSCSI initiator identifiers (IDs) to which the iSCSI target is assigned. The format of this parameter is IdType:Value. The acceptable values for this parameter are: DNSName, IPAddress, IPv6Address, IQN, or MACAddress.
Parameter properties
Type: | InitiatorId[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-TargetName
Specifies the name of the iSCSI target.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.