How to remove «Account Unknown» from access control lists of all objects in a folder on Windows 10?

2023-05-06--10-56-24

It would help: tenforums.com/general-support/117036-icacls-remove-user-variable.html#post1489274
I guess the script needs to be adapted.

What is «Account Unknown» in Windows permissions?

icacls "<path>" /reset /t
icacls "<path>" /inheritance:d /t

E.g:

icacls "C:\tools" /reset /t
icacls "C:\tools" /inheritance:d /t