Setting folder owners programatically
The server which stored our profiles died recently, so they're all been restored to another. However, in that transition the folder ownership details have all vanished... No problem, I thought, a small bit of c# will do it but no. Windows doesn't let you programatically set the ownership of a folder to anything other than the account the program/script is running in or an administrator.
So, has anyone got a quicker way that I can set the directory ownership of 107 profiles rather than me having to manually go through them all?