Security object users ad restore default

Hello everybody.
Help, please, with a script.
There is a domain in which you need to reset security to the default user objects.
There are many objects and they are located in the tree of the organizational unit. I would like to run a script that would work out this task. Unfortunately, nothing could be found on the Internet.