Greetings Powershell Gurus and beginners,
I am reaching out to you all because I have a question concerning the takeown command. I am trying to change the owner of a home folder and all sub folders for users on the network, but I am getting stuck on how to specify a security group within the command. Lets say I am trying to add a security group called: "battleship". Below is the following command that I use:
takeown /f "H:\Home Folders" /a /r
I can run the above command successfully, but the problem is this will give the domain admin ownership of the folders while I am trying to add "battleship" as the owner. How would I add the security group into the above command to successfully give ownership to all home folders on my network? Any comments and/or suggestions is greatly appreciated.