hello, I want to change the path of the homedir folder for a lot of users.
I have a txt file with the usernames of the users.
I know the command to change the homedirs folder:
for /f "delims=" %%a in ('c:\users.txt') do (dsmod user "cn=full name,ou=hc gebruikers,ou=hc,DC=hc,dc=tmg,dc=lan" -hmdir=\\hc-file02\homedirs\%%a.
The only problem is how do i get the full name in this command?
Can sombody help.
Thank in advance
Vox
Change Homedir folder
Moderator: DosItHelp
Re: Change Homedir folder
Code: Select all
set $OU=ou=hc gebruikers,ou=hc,DC=hc,dc=tmg,dc=lan
for /f "usebackq delims=" %%a in ("c:\users.txt") do (
dsquery user "%$OU%" -scope subtree -samid %%a|dsmod user -hmdir "\\hc-file02\homedirs\%%a"
)