Remove-IscsiServerTarget

Remove-IscsiServerTarget

Deletes the specified iSCSI target.

Sintaxis

Parameter Set: TargetName
Remove-IscsiServerTarget [-TargetName] <String> [-ComputerName <String> ] [-Credential <PSCredential> ] [ <CommonParameters>]

Parameter Set: InputObject
Remove-IscsiServerTarget -InputObject <IscsiServerTarget> [-ComputerName <String> ] [-Credential <PSCredential> ] [ <CommonParameters>]

Descripción detallada

The Remove-IscsiServerTarget cmdlet deletes an iSCSI Target object. An iSCSI initiator cannot access the virtual disk after the target is deleted.

Parámetros

-ComputerName<String>

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.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Credential<PSCredential>

Specifies the credentials when connecting to a remote computer.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-InputObject<IscsiServerTarget>

Accepts an iSCSI Target object from the input pipeline.

Alias

ninguno

¿Requerido?

true

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-TargetName<String>

Specifies the name of the iSCSI target.

Alias

ninguno

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

  • Microsoft.Iscsi.Target.Commands.IscsiServerTarget

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • None

Ejemplos

EXAMPLE 1

This example deletes the target named TargetOne on the local server.

PS C:\> Remove-IscsiServerTarget –Targetname "TargetOne"

EXAMPLE 2

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}

Temas relacionados

ForEach-Object

Get-IscsiServerTarget

New-IscsiServerTarget

Set-IscsiServerTarget