rpettit Posted July 20, 2015 Posted July 20, 2015 (edited) I am looking for a script that will search all folders and subfolder for "Favourites" then to take ownership of this file and add permissions. It appears all of our Favourites folders within each user on the server no longer has an owner. Many thanks - Would say a LOT of time! Edited July 20, 2015 by rpettit
halbaradkenafin Posted July 22, 2015 Posted July 22, 2015 I am looking for a script that will search all folders and subfolder for "Favourites" then to take ownership of this file and add permissions. It appears all of our Favourites folders within each user on the server no longer has an owner. Many thanks - Would say a LOT of time! What permissions do you need to set? A quick bit of powershell code that will find all versions of Favourites would be: Get-ChildItem -Path "\\Server\Sharedfolder" -Recurse -Directory | Where {$_.Name -eq "Favorites"} | Select FullName Depending on what permissions you want to set it can then be pretty easily modified to take ownership and add the permissions.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now