Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi folks, this task has to be done on Windows 2008 Server: Create a login script

ID: 3684011 • Letter: H

Question

Hi folks, this task has to be done on Windows 2008 Server:

Create a login script that runs when the user logs in a domain. The script is to be able to do the following tasks:

Connects the shared folder S1 on server SRV1 and map drive letter called X. connects the shared folder S2 on server SRV2 and map drive letter called Y. connects to a home directory on server SRV1 and map drive letter called Z. The login script must use a variable to identify the user. One login script for all users and all functions. This script has to be placed in a GPO and the GPO will be applied to the users.

I know how to place it in a GPO and how to link to the users, I need help in writing the script (sequence of commands). Appreciate any help.

Explanation / Answer

To create a script for given task, you need to open a notepad. type the following code and save it with name logon.vbs

Set ObjNet = CreateObject("WScript.Network")

strUser = ObjNet.UserName

ObjNet.MapNetworkDrive "X:","\SRV1S1"

ObjNet.MapNetworkDrive "Y:" , "\SRV2S2"

ObjNet.MapNetworkDrive "Z:","\SRV2users" & strUser

WScript.Quit

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote