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

    Joined:
    Mar 25, 2005
    Messages:
    451
    Location:
    Sydney
    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

    Joined:
    Feb 19, 2016
    Messages:
    1,440
    Location:
    BRISBANE
    What have you tried so far?
     

Share This Page

Advertisement: