Examples
Dsquery user “OU=Employees,DC=
mustchpwd yes
Dsquery user “OU=Employees,DC=
“\\Server04\Profiles\$username$” -HMDRV U:
Dsquery user “OU=Employees,DC=
A techie place to learn, remember, and share.
Dsquery user “OU=Employees,DC=
mustchpwd yes
Dsquery user “OU=Employees,DC=
“\\Server04\Profiles\$username$” -HMDRV U:
Dsquery user “OU=Employees,DC=
Then I took the sAMAccountName column by itself and ran it through for /f with a batch file using RMTSHARE (a Microsoft utility for remotely creating shares):
quote:
md y:\users\%1
rmtshare \\servername\%1$=f:\users\%1 /grant domain\user:full /remove everyone /grant "domain\Domain Admins":full