Propergating Login Script User Profile In AD using script

Posted on 2005-04-17
Medium Priority
Last Modified: 2010-04-14

I'm currently testing our processes to migrate from a Netware 5 to Windows 2000/2003 infrastructure.

I need a tool which when fed with a list of usernames with add the path to the login script to the user's "Login script" profile in AD.

I'm ok in VB/VBS but I'm short in time so any ideas would be greatfully recieved!

Many Thanks

Question by:Keironmc
LVL 85

Assisted Solution

oBdA earned 400 total points
ID: 13801335
That little batch script should do the trick (assuming an input file with one name per line); simply adjust the settings at the beginning.
The script is currently in test mode, remove the capitalized ECHO in front of the "net user" line to run it for real. net user's output will be redirected to a log file.
As usual: Try it with a list with only a few test users first.

@echo off
set UserFile=D:\Temp\test.txt
set LogFile=D:\Temp\test.log
set LogonScript=logon.cmd
for /f "delims=" %%a in ('type "%UserFile%"') do (
  echo Processing %%a ...
  >>"%LogFile%" echo ********** %%a **********
  ECHO net user "%%a" /SCRIPTPATH:%LogonScript% /domain 1>>"%LogFile%" 2>&1
LVL 16

Accepted Solution

craylord earned 800 total points
ID: 13802178
This can be done within the Active Directory Users and Computers mmc console. Browse to the OU with the users and select all the users you want to modify. Right click and choose properties. You should have a window pop up that's labeled Properties on multiple objects. It looks just like a user profile box, but it will change the settings on the multiple objects.

Author Comment

ID: 13806899
Cheers Guys

The AD solution suits my needs better, but partial credit to oBdA as I have some use for that scipt at another site.

All the Best


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
With more and more companies allowing their employees to work remotely, it begs the question: What are some of the security risks involved with remote employees and what actions should we take to secure them?
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question