Remove-R1DirectoryEntry

SYNOPSIS

Deletes an entry from the directory.

SYNTAX

Remove-R1DirectoryEntry [-dn] <String> [[-deleteSubNodes] <Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Deletes the entry at the given DN. An entry with children cannot be deleted unless deleteSubNodes is specified, in which case the whole subtree goes with it.

EXAMPLES

Example 1

Remove-R1DirectoryEntry -dn 'uid=one,o=example'

Deletes one entry, after prompting for confirmation.

Example 2

Remove-R1DirectoryEntry -dn 'ou=people,o=example' -deleteSubNodes $true

Deletes an entry and everything beneath it.

PARAMETERS

-dn

The DN of the entry.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-deleteSubNodes

Deletes the entry together with everything beneath it. Without it, an entry with children cannot be deleted.

Type: Boolean
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Void

NOTES

An entry which has children is not removed unless -deleteSubNodes is specified. Without it the API refuses the request and the entry is left in place.

Get-R1DirectoryEntry