Mass Changes To Active Directory User Objects
we point users home , profile path follows;
\\server\home\a-d\adam01
the a-d portion in example above split ids a-d, e-h, j-p, q-z not in 1 large folder.
what need start using dfs patchs follows;
\\domain\dfs\ad\adam01
we have tested , works fine, problem have several thousand objects , cant manually go through each 1 editing it. need replace the \\server\home\ \\domain\dfs\home\
does know of tool can 'find & replace' job on several thousand objects?
\\server\home\a-d\adam01
the a-d portion in example above split ids a-d, e-h, j-p, q-z not in 1 large folder.
what need start using dfs patchs follows;
\\domain\dfs\ad\adam01
we have tested , works fine, problem have several thousand objects , cant manually go through each 1 editing it. need replace the \\server\home\ \\domain\dfs\home\
does know of tool can 'find & replace' job on several thousand objects?
can read off list of users (say, users.ini) or can directly run adsi query against domain list users , pass each user account , domain sub-routine:
salvador manaois iii
mcitp | enterprise/server admin
bytes & badz : http://badzmanaois.blogspot.com/
| sub changeuserprofilepath(strdomain, struser) | |
| const oldprofile = "\\server\home" | |
| const newprofile = "\\domain\dfs\home" | |
| dim suser, strnewprofilepath | |
| set suser = getobject("winnt://" & strdomain & "/" & struser & ",user") | |
| x=instr(suser.profile, oldprofile) | |
| if x > 0 then | |
| strnewprofilepath = replace(suser.profile, oldprofile, newprofile) | |
| suser.put "profilepath", strnewprofilepath | |
| suser.setinfo | |
| end if | |
| end sub |
salvador manaois iii
mcitp | enterprise/server admin
bytes & badz : http://badzmanaois.blogspot.com/
Windows Server > Directory Services
Comments
Post a Comment