Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Remove-IscsiServerTarget

Remove-IscsiServerTarget

microsoft.iscsi.target.commands.dll

Synopsis

Deletes the specified iSCSI target.

Syntax

Remove-IscsiServerTarget [-TargetName] [-ComputerName] [-Credential] [<CommonParameters>]

Remove-IscsiServerTarget [-ComputerName] [-Credential] [-InputObject] [<CommonParameters>]

Detailed Description

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

Parameters

-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.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-Credential <PSCredential>

Specifies the credentials when connecting to a remote computer.

Aliases

None

Required?

false

Position

named

Default value

None

Accept pipeline input?

True (ByPropertyName)

Accept wildcard characters?

false

-InputObject <IscsiServerTarget>

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

-TargetName <String>

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

Input Type

Microsoft.Iscsi.Target.Commands.IscsiServerTarget

Return Type

None

Notes

None

Examples

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}

Online Version
ForEach-Object
Get-IscsiServerTarget
New-IscsiServerTarget
Set-IscsiServerTarget