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: Get targets on the local server
PS C:\> Get-IscsiServerTarget
This example gets the iSCSI targets on the local server.
Example 2: Get targets on a remote server
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: Get targets on a cluster
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: Get a target by using a path
PS C:\> Get-IscsiServerTarget -Path "E:\temp\test.vhdx"
This example gets the iSCSI target associated with the VHD with the path E:\temp\test.vhdx.
Example 5: Get targets assigned to an initiator
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 in the resource group on which this cmdlet runs.
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, and 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
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기