using takeown in a script

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Max Kozlov Max Kozlov 1 month, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #50106
    Profile photo of Tony Wainwright
    Tony Wainwright
    Participant

    Hi,

    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?

    Thanks
    Tony

    #50431
    Profile photo of Max Kozlov
    Max Kozlov
    Participant

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

    I believe you should use robocopy for this task

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.