Take Ownership and Grant Permissions

Sharing a advanced script that I have used for one of our projects, This script is compatible with Powershell Version 2.0 & 3.0 There was a requirement from Backup Team that When they run the script on particular folder it should recurse thru all subfolder Take ownership of only those folder where Backup account gets access…