1. If you're receiving a message that you are banned from the Current Events or Politics forums, it's not you specifically: those forums have been hidden for all users. For more info, see here.
    Dismiss Notice

Powershell Script to set ownership perms and move folders

Discussion in 'Programming & Software Development' started by kevy_stylez, Jul 15, 2020.

  1. kevy_stylez

    kevy_stylez Member

    Mar 25, 2005
    Hi all,

    Hopefully someone can help me out, I am trying to come up with a script to do the following:

    I need to script to look within the top parent folder of home directories/profile folders on a network share and prompt to put in a username so it'll go and look for the profile folder matching that username. Once it finds it, it then needs to look if the two folders exist e.g. downloads and favourites within that user profile folder and if they do, move them from the user's profile folder to another sub folder within that same user's profile folder, does that make sense?

    The script will also need to set the ownership of a domain account and also set the user (that is prompted for) to that profile folder before it checks for those two folders and move them as well.

    Hopefully someone can make sense of what I am trying to achieve. I think it's possible I just don't know how to best set the variables and how to echo the prompting etc.

    Thanks in advance
  2. waltermitty

    waltermitty Member

    Feb 19, 2016
    What have you tried so far?

Share This Page