Get-IscsiServerTarget
Obtains iSCSI targets and their associated properties.
Syntax
Get-IscsiServerTarget
[-ClusterGroupName <String>]
[[-TargetName] <String>]
[-ComputerName <String>]
[-Credential <PSCredential>]
[<CommonParameters>]
Get-IscsiServerTarget
[-ClusterGroupName <String>]
[-Path <String>]
[-ComputerName <String>]
[-Credential <PSCredential>]
[<CommonParameters>]
Get-IscsiServerTarget
[-ClusterGroupName <String>]
[-InitiatorId <InitiatorId>]
[-ComputerName <String>]
[-Credential <PSCredential>]
[<CommonParameters>]
Description
The Get-IscsiServerTarget cmdlet obtains iSCSI targets and their associated properties from the local server or specified computer.
Examples
EXAMPLE 1
PS C:\> Get-IscsiServerTarget
This example gets the iSCSI targets on the local server.
EXAMPLE 2
PS C:\> Get-IscsiServerTarget -ComputerName "fs1.contoso.com"
This example gets all of the iSCSI targets on the remote server named fs1.contoso.com.
EXAMPLE 3
PS C:\> Get-IscsiServerTarget -ComputerName "fscluster.contoso.com" -ClusterGroupName "target1group"
This example gets all of the iSCSI targets in the resource group named target1group on the cluster named fscluster.contoso.com.
EXAMPLE 4
PS C:\> Get-IscsiServerTarget -Path "E:\temp\test.vhd"
This example gets the iSCSI target associated with the VHD with the path "E:\temp\test.vhd"
EXAMPLE 5
PS C:\> Get-IscsiServerTarget -InitiatorId "DNSName:TargetSvr.Contoso.com"
This example gets all of the iSCSI targets that have been assigned to the initiator with type DNSName, and value TargetSvr.contoso.com.
Parameters
-ClusterGroupName
Specifies the name of the resource group or network within the resource group on which this cmdlet should be run.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Credential
Specifies the credentials when connecting to a remote computer.
Type: | PSCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-InitiatorId
Specifies the iSCSI initiator identifiers (IDs) to which the iSCSI target is assigned.
Use this parameter to filter out the iSCSI Server Target object which can be accessed by the given iSCSI initiator.
The format of this parameter is IdType:Value. The acceptable values for this parameter are: DNSName, IPAddress, IPv6Address, IQN, or MACAddress.
Type: | InitiatorId |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Path
Specifies the path of the virtual hard disk (VHD) file that is associated with the iSCSI virtual disk.
Use this parameter to filter the iSCSI Target object that is associated with the virtual disks.
Type: | String |
Aliases: | DevicePath |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TargetName
Specifies the name of the iSCSI target.
Use this parameter to filter out the iSCSI Target object.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Microsoft.Iscsi.Target.Commands.IscsiServerTarget
Outputs
Microsoft.Iscsi.Target.Commands.IscsiServerTarget
Related Links
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for