use command to change the owership for all folders

I have a windows Server 2008 R2 being used as a file server. There are about 20 TB files on it.

We would like to use command to change the ownership of all the folders on it, which command should I use?

Thanks.
Jason YuAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michael DyerSenior Systems Support AnalystCommented:
The Takeown.exe command is made for this:  https://technet.microsoft.com/en-us/library/cc753024.aspx

You can specify the user to take ownership, and you can use the recursive switch to include subdirectories.
0
Steve KnightIT ConsultancyCommented:
Only thing I would say is.... why?  The owner of a file is normally going to be the creator and therefore helps to identify who put the file there and for quotas etc.

Steve
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gerwin Jansen, EE MVETopic Advisor Commented:
@Steve, I'd say: "Enables an administrator to recover access to a file that previously was denied, by making the administrator the owner of the file." - another question would be why this is needed ;) Quote if from the tn article above.
0
Lionel MMSmall Business IT ConsultantCommented:
I assume when you say 20TB of files you are not meaning the Windows and other system files--taking ownership of all those files and folders will cause problems with Windows. So if this is for non-windows folders I agree with using takeown -- instructions are here https://technet.microsoft.com/en-us/library/cc753024.aspx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.