On Wed, 20 Oct 2004 18:48:46 +0200, "Gil" <(E-Mail Removed)> wrote:
>hi,
>1. I have on the AD a OU with 200 users. I want to automaticlly create
> folders with the name of the user on one of my servers. How can I do it ? I
>can do it with GPO and a script. Can somone give me the correct syntax of
> the commands ???
> 2. In case I can edit the permissions of the new folder with a command it
> will GREAT ! How can I do it ?
> 3. What is the command line to do a log-off and then a login for the user
>?
>
> thanks.
>
>
Assuming that the folder path on the server is \\Server\Users\Username,
and that your OU is "OU=MyOU,DC=MYDomain,DC=COM", then
from a Windows XP domain member, run the following batch:
@echo off
setlocal
set dom=MyDomain
set begin="OU=MyOU,DC=MYDomain,DC=COM"
pushd \\Server\Users
for /f "Tokens=*" %%a in ('dsquery user %begin% -o samid') do (
MD %%a
echo y| cacls %%a /E /G %%a:F
)
popd
Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com