How To Create A Logon Script Server 2008
- Home
- Windows
- Windows Server
I wrote a .vbs map user drives script that works locally on the windows 7 computer. I want to automatically execute it on a logon into a Windows 2008 R2 Domain. how do I do this?


Group Policy Preferences is the way to go with drive and printer mapping, but if you need a logon script, you don't have to just use .bat, GPO will accept and run .vbs as well. I have a script that writes to the event log the users name, IP address of the PC and of course the time and stuff. I got in the habit of doing this to better be able to track who was logged on a system with a certian IP at a certain time. Easier than wading through the security logs. This script is a .VBS and it used to include drive mapping and printer mapping until I learned about GPP.
- ROM
- CPU
- RAM
- GPU

7 Replies

You'll need to create a .bat file that calls the VBS.
Stack Overflow has a question like this that should help.
Then open up GPO and configure your login script.
The big question is why not do everything from AD/GPO without the use of a script?
If you're only mapping drives, that can be done within GPO, without using the script, it's less likely to cause issues.

IT Partners, Inc. is an IT service provider.
I am not a group policy expert. Eventually I want to map drives based on the User Group membership. How do I do this in the GPO?
Thanks.

Barry4552 wrote:
I am not a group policy expert. Eventually I want to map drives based on the User Group membership. How do I do this in the GPO?
Thanks.
here you go

Paragraph wrote:
Barry4552 wrote:
I am not a group policy expert. Eventually I want to map drives based on the User Group membership. How do I do this in the GPO?
Thanks.
here you go
You sir blew my mind. This is something I have been looking for. I just didn't know what questions to ask.


Group Policy Preferences is the way to go with drive and printer mapping, but if you need a logon script, you don't have to just use .bat, GPO will accept and run .vbs as well. I have a script that writes to the event log the users name, IP address of the PC and of course the time and stuff. I got in the habit of doing this to better be able to track who was logged on a system with a certian IP at a certain time. Easier than wading through the security logs. This script is a .VBS and it used to include drive mapping and printer mapping until I learned about GPP.

IT Partners, Inc. is an IT service provider.
Used Group Policy to accomplish this. Thanks, Jeff


Thanks Berry! Lots of ways to skin the cat.
This topic has been locked by an administrator and is no longer open for commenting.
To continue this discussion, please ask a new question.
How To Create A Logon Script Server 2008
Source: https://community.spiceworks.com/topic/232705-how-to-i-create-and-setup-windows-server-2008-r2-logon-vbs-scripts
Posted by: kingparrived.blogspot.com
0 Response to "How To Create A Logon Script Server 2008"
Post a Comment