Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Deletes the specified iSCSI target.
Parameter Set: TargetName
Remove-IscsiServerTarget [-TargetName] <String> [-ComputerName <String> ] [ <CommonParameters>]
Parameter Set: InputObject
Remove-IscsiServerTarget -InputObject <IscsiServerTarget> [-ComputerName <String> ] [ <CommonParameters>]
The Remove-IscsiServerTarget cmdlet deletes an iSCSI Target object. An iSCSI initiator cannot access the virtual disk after the target is deleted.
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
Accepts an iSCSI Target object from the input pipeline.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
Specifies the name of the iSCSI target.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
The input type is the type of the objects that you can pipe to the cmdlet.
- Microsoft.Iscsi.Target.Commands.IscsiServerTarget
The output type is the type of the objects that the cmdlet emits.
- None
This example deletes the target named TargetOne on the local server.
PS C:\> Remove-IscsiServerTarget –Targetname "TargetOne"
The example deletes all of the targets on the local server.
PS C:\> $all = Get-IscsiServerTarget
PS C:\> ForEach-Object –InputObject ($each in $all) –Process {Remove-IscsiServerTarget -InputObject $each}