Skip to content

Remove-ItemSafely actually executes Remove-Item #28

Description

@ZhaoXiangXML

On my computer the Remove-ItemSafely actually removes the file.

Also the help command indicates Remove-ItemSafely is actually just Remove-Item.

> Remove-ItemSafely -?

NAME
    Remove-Item

SYNTAX
    Remove-Item [-Path] <string[]> [-Filter <string>] [-Include <string[]>] [-Exclude <string[]>] [-Recurse] [-Force] [-Credential <pscredential>] [-WhatIf] [-Confirm] [-UseTransaction] [-Stream
    <string[]>]  [<CommonParameters>]

    Remove-Item -LiteralPath <string[]> [-Filter <string>] [-Include <string[]>] [-Exclude <string[]>] [-Recurse] [-Force] [-Credential <pscredential>] [-WhatIf] [-Confirm] [-UseTransaction]
    [-Stream <string[]>]  [<CommonParameters>]


ALIASES
    ri
    rm
    rmdir
    del
    erase
    rd


REMARKS
    Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help.
        -- To download and install Help files for the module that includes this cmdlet, use Update-Help.
        -- To view the Help topic for this cmdlet online, type: "Get-Help Remove-Item -Online" or
           go to https://go.microsoft.com/fwlink/?LinkID=113373.


n> Get-RecycledItem -?

NAME
    Get-RecycledItem

SYNOPSIS
    Get all items from the recycle bin, optionally filtered by the parameters


SYNTAX
    Get-RecycledItem [[-OriginalPath] <String>] [[-SortingCriteria] <String>] [[-Descending]] [[-Top] <Int16>] [[-SelectorScript] <ScriptBlock>] [<CommonParameters>]

    Get-RecycledItem [[-OriginalPathRegex] <String>] [[-SortingCriteria] <String>] [[-Descending]] [[-Top] <Int16>] [[-SelectorScript] <ScriptBlock>] [<CommonParameters>]


DESCRIPTION
    Get all items from the recycle bin, optionally filtered by the parameters


RELATED LINKS

REMARKS
    To see the examples, type: "get-help Get-RecycledItem -examples".
    For more information, type: "get-help Get-RecycledItem -detailed".
    For technical information, type: "get-help Get-RecycledItem -full".



Activity

  1. bdukes commented on Sep 30, 2024

    @bdukes
    Owner

    The permanent deleting is is a known issue, see #18 (if you specify any of these arguments, it will not use the recycle bin: DeletePermanently, Filter, Include, Exclude, Recurse, Force, Credential).

    Because of this (poor) design, its documentation is just a forward of Remove-Item's documentation (I didn't realize it would show that the module name was Remove-Item).

    I've gone ahead and unlisted the module.

  2. ZhaoXiangXML commented on Oct 12, 2024

    @ZhaoXiangXML
    Author

    I'm using -Force -Recurse to remove folders, I guess that is the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions