using takeown in a script

Welcome Forums General PowerShell Q&A using takeown in a script

Viewing 1 reply thread
  • Author
    • #50106
      Topics: 18
      Replies: 23
      Points: 0
      Rank: Member


      I'm trying to write a script that copies the contents of a users Redirected Folder to a freshly created folder with a new name (automated when a user changes their name). We use the strictest permissions due to the nature of the business and therefore admins don't have access to the original folder.

      I'm going to use takeown on the original folder so that the script has the right permissions. My question, as some folders are in the 40gb (I know!!) region, is: Will PowerShell wait until the takeown has finished before moving onto the next command, or will I have to include a Wait command?


    • #50431
      Topics: 2
      Replies: 376
      Points: 0
      Rank: Member

      PS will wait takeown....
      but you ruine ALL of your security with takeown

      I believe you should use robocopy for this task

Viewing 1 reply thread
  • The topic ‘using takeown in a script’ is closed to new replies.