locked
remove-item file going to recycle bin on a different profile RRS feed

  • Question

  • I created a test text file (a.txt) using notepad and then ran the following script (d.ps1):


    $b = read-host "Input filename to delete"

    remove-item "C:\My Documents\$b"

    remove-item "E:\My Documents\$b"

    remove-item "F:\My Documents\$b"

    remove-item "C:\Users\Ryan\Google Drive\My Documents\$b"


    When I do so the file shows up in the recycle bin on another profile

    Ryan, Denver, CO

    Saturday, December 30, 2017 5:42 PM

All replies

  • Who is the owner of the file?


    \_(ツ)_/

    Saturday, December 30, 2017 6:53 PM
  • Hi,

    This is not a normal behavior. I suggest that run the following command for testing in PowerShell Console directly:
    Remove-Item -Path 'C:\My Documents\filename' -WhatIf

    If you need further help, please feel free to let us know.

    Best Regards,
    Albert

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, January 1, 2018 6:02 AM
  • Hi,

    Just want to confirm the current situations. Have you tried the method provided before?

    If you already tried them or the issue remains after trying them, please don’t hesitate to tell me. I will do more research and try my best to give you helpful suggestions.

    Best Regards,
    Albert

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, January 3, 2018 9:37 AM
  • Hi,

    I am checking how the issue is going, if you still have any questions, please feel free to contact us.

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.
    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
    If no, please reply and tell us the current situation in order to provide further help.

    Appreciate for your feedback.

    Best Regards,
    Albert

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Friday, January 5, 2018 3:10 AM
  • I am.

    Ryan Burton


    Ryan, Denver, CO

    Sunday, January 7, 2018 5:33 AM
  • Hi Ryan,

    Have you run the command above for testing? And what is the result?

    If you need further help, please feel free to let us know.

    Best Regards,
    Albert

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, January 8, 2018 9:29 AM