Hello,
I put this 2 instructions in a Powersh-Admin Console:
After Operation the folder is NOT deleted. I am user rentz and I have admin authorisation. What is the fault?
Hello,
I put this 2 instructions in a Powersh-Admin Console:
After Operation the folder is NOT deleted. I am user rentz and I have admin authorisation. What is the fault?
Wildcard Cruncher,
Welcome to the forum.
First of all … please do not post images of code as this is not helpful at all.
https://idownvotedbecau.se/imageofcode
Instead post the plain text and format it as code.
When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.
Thanks in advance
How to format code in PowerShell.org 1 <---- Click
( !! Sometimes the preformatted text button hides behind the settings gear symbol. )
Taking ownership does not change the permissions on an object. You may give your own account the right to delete (write) the folders and files in it before you can delete it.
I have admin-permission for the account rentz. The “sh256new*” folder have system permission? I think. I cannot delete it with admin permission. I thought, “takeown” set the permission for me as a user, what it has done. Have you another solution, how I can delete thus folder?
No. takeown
takes the ownership of an object.
You have to give write permission to your account to be able to delete objects. Did you check the permissions set on the disired folder? How do they look?
Schreibgeschützt! Read-only! These sha256new* folders are in my tmp folder. Any checksums. But I don’t know why they are there. Thanks for the clarification.
Do they bother you? If “yes”, why?
Probably some application saved them there for reasons. … what’s the issue?
I’m confused. Did you solve your issue? How?
And did you check the permissions? How do they look like?
The issue was that this 5 folder wast ca. 5GB space on my disk and I didnt know from what, for what and I could’t delete they and the solution was with this:
Add-Type ‘[DllImport(“ntdll.dll”)] public static extern int RtlAdjustPrivilege(int Privilege, bool Enable, bool CurrentThread, ref bool EnabledOut);’ -name token -namespace privilege
9,17,18 | %{[void][privilege.token]::RtlAdjustPrivilege($_,1,0,[ref]0)}
Remove-Item -Path “C:\Zielordner” -Recurse -Force
Now tjhe 5 folder are in Nirwana. Thanks for your help.