PowerShell command to enable security permissions inheritance for the %tmp% folder within Windows 10

A certain Windows 10 Pro computer that I support has an issue where the enable security permissions inheritance for the %tmp% folder keeps getting disabled.

This %tmp% folder is located in its default location of C:\Users\username\AppData\Local\Temp

What is the power shell command that will re-enable security permissions inheritance for the %tmp% folder within a Windows 10 OS?
IT GuyNetwork EngineerAsked:
Who is Participating?
 
Tom CieslikConnect With a Mentor IT EngineerCommented:
You can try to use

Get-ChildItem c:\ | Get-NTFSAccessInheritance

I believe if you'll modify path to this C:\Users\%username%\AppData\Local\Temp it should work too but I did not tested it.

Try this article

https://blogs.technet.microsoft.com/heyscriptingguy/2014/11/23/weekend-scripter-manage-ntfs-inheritance-and-use-privileges/
0
 
Jose Gabriel Ortega CConnect With a Mentor CEO J0rt3g4 Consulting ServicesCommented:
No with %%s
    Get-ChildItem "C:\Users\$env:username\AppData\Local\Temp\" | Get-NTFSAccessInheritance

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.