PC Review


Reply
Thread Tools Rate Thread

Create folders commands

 
 
Gil
Guest
Posts: n/a
 
      20th Oct 2004
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.



 
Reply With Quote
 
 
 
 
Jerold Schulman
Guest
Posts: n/a
 
      20th Oct 2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
comparsion overview C++ commands vs C# - commands ? Howie Meier Microsoft C# .NET 3 28th Nov 2006 09:47 AM
Convert 'Open Report' commands to 'Output to' commands Leslie Isaacs Microsoft Access Macros 9 7th Mar 2005 07:03 PM
Convert 'Open Report' commands to 'Output to' commands Leslie Isaacs Microsoft Access VBA Modules 9 7th Mar 2005 07:03 PM
Create folders commands Gil Microsoft Windows 2000 Networking 1 20th Oct 2004 08:07 PM
windows explorer tip on keybords commands to open different folders claudio Windows XP General 0 13th Nov 2003 03:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:01 PM.