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

shanparamesshanparames Member Posts: 103 ■■■□□□□□□□
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
Thanks

Comments

  • JeanMJeanM Member Posts: 1,117
    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.
    2015 goals - ccna voice / vmware vcp.
  • QordQord Member Posts: 632 ■■■■□□□□□□
    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:
    get-adgroupmember "oldgroup" | foreach {Add-ADGroupMember "newgroup" $_.SamAccountName }
    
  • shanparamesshanparames Member Posts: 103 ■■■□□□□□□□
    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
    Thanks
  • JeanMJeanM Member Posts: 1,117
    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 :)
    2015 goals - ccna voice / vmware vcp.
Sign In or Register to comment.