Link to home
Start Free TrialLog in
Avatar of cogit
cogit

asked on

create a script

Whats the syntax used to create a simple script that creates  the following

\\computername\share$\%username%
Avatar of TheCleaner
TheCleaner
Flag of United States of America image

are you wanting to create that user's folder or what?
Avatar of krais99
krais99

mkdir \\computername\share$\%username%

That will create a folder under the network directory share$ with the user's name for the folder name.

Or if you're trying to map a network drive it would be:

net use h: \\computername\share$\%username%

Hope this helps.

Todd
Todd's answer is correct if you are talking about creating a simple folder based on the username of the currently logged on user (assuming that user has rights to create a folder on that share).

I'm still curious what you are trying to accomplish.
Avatar of cogit

ASKER

Because I have 500 users in AD and instead of using the the profile tab for creating home folder path, I would use a .bat to the OU where the users reside.
Avatar of Netman66
All 500 Users can be changed/updated at one time.  Simple select ALL the users, then right-click them and select Properties.  All of the properties that are common to User accounts will be available to change - profile and home drive should be included here.

Simply add your line:  \\servername\share$\%username%
ASKER CERTIFIED SOLUTION
Avatar of TheCleaner
TheCleaner
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the points but....technically Todd answered it first, and AOD gave you a solution as well, so maybe a points split is in order?  Up to the author of course, but I don't feel right just adding to another answer.