0

I have a batch file containing a script that automates an operation. I would like that the batch file can be run at loading into user's Windows machine profile of a local network. Can I get this action done using the Active Directory for all selected users such that as a user get logged into his/her own profile the batch file executes for the one immediately? Can it get done if the batch file can be only run from an administator credentials?

1 Answer 1

2

Active Directory allows logon scripts to be run pretty easily.

Step 1: Place the script in: \\MyDomainController\SYSVOL\myFQDN\scripts Create scripts folder if it isn't there. All domain controllers have this shared volume that the GPOs get shared out all domain computers. Just type \\DC into file explorer and it will take to the root of the share where you can drill down, replacing DC with the hostname of your domain controller.

For this example, I will name the script login1.bat.

Step 2: Open Active Directory Users and Groups on the DC. Right click on the user you want to run the login script as and choose Properties. Click the Logon tab and in the box for Logon Script, type login1.bat.

That's it. Now that script will run when the user logs in on any machine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .