+ Reply to Thread
Results 1 to 5 of 5
  1. Member
    Join Date
    May 2009
    Posts
    83
    #1

    Default Moving one file share from one file server to another file server in DFS.......

    Hi , In our Domain environment, we have multiple file servers, the shares of which are managed in DFS. One share of 200 GB has to be moved from one file server to another file server in which available free space is more and the 200 GB Share has to be increased in quota size to 500 GB.We are using robocopy and the copy got finished.
    This share has 3 groups named based on the file server name with Full, Modify and Read only .Each of which has around 100 users.After copying to the new file server, now it is taking too much time for me to assign these users back to the new share and setting the permissions to the newly created groups based on the new file server.

    I need a script to automate the addition of the users in one group to another group without adding manually in windows 2003/2008

    After completing this only , I have to change the DFS LInk pointing to the new file server.
    Any help is greatly appreciated
    Reply With Quote Quote  

  2. SS -->
  3. Senior Member JeanM's Avatar
    Join Date
    Mar 2012
    Location
    California
    Posts
    1,105

    Certifications
    CCNA, MCP, S+, N+, A+
    #2
    You shouldn't need a script to do that if the ntfs groups are to be pushed all the way down, and sub-folders inherit from parent.

    The groups should still have the users right? So you are just adding the groups to a new share, or did something happen to the group membership itself with users?

    You could extract contact of group to csv, then import the users into new group if you had to do that. But, for a simple file share move, the users should still be in the group(s).

    Otherwise, look into Scriptlogic software, I used that when I did account admin/ad/ntfs work and it came in handy.
    Reply With Quote Quote  

  4. Senior Member
    Join Date
    Jun 2010
    Location
    Vermont
    Posts
    597

    Certifications
    SNAP+
    #3
    You could powershell it, if yer feelin frisky. Something like this should work:
    $oldgroupmembers = get-adgroupmember "oldgroup" | select samaccountname for-each ($person in $oldgroupmembers) { add-adgroupmember -dentity $person "newgroup" }
    I'm not at work and haven't tested it, but I think that'll do what you want. If you'd like, I can test it at the office tomorrow and let you know.

    EDIT: Just to clarify, what you're trying to do is add all members of "this" group to "that" group. Is that correct?

    EDIT2: I already had an existing one-liner for this:
    Code:
     get-adgroupmember "oldgroup" | foreach {Add-ADGroupMember "newgroup" $_.SamAccountName }
    Last edited by Qord; 07-28-2014 at 07:59 PM.
    Reply With Quote Quote  

  5. Member
    Join Date
    May 2009
    Posts
    83
    #4
    Hi All,

    Thanks for your reply

    Nothing happened with the existing group; due to the naming convention followed for the movement of the shares in the file server, it is mandatory to assign the users in the old group to the new group with the related name of the new file server

    I will try with the code pasted and let you know here
    Reply With Quote Quote  

  6. Senior Member JeanM's Avatar
    Join Date
    Mar 2012
    Location
    California
    Posts
    1,105

    Certifications
    CCNA, MCP, S+, N+, A+
    #5
    Ok, so the issue isn't with groups to folder assignment but more with group/user membership. And, renaming the groups isn't an option either?

    Extract membership list, create new group, import membership list , pretty simple
    Reply With Quote Quote  

+ Reply to Thread

Social Networking & Bookmarks