Propergating Login Script User Profile In AD using script

Posted on 2005-04-17
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 82

    Assisted Solution

    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

    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

    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


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    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…
    If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now