Stopping Active Directory Defined Logon Script Running When Logging into Server 2008

Experts,

Within our Server 03 active directory, all users are given a logon.bat file as a Logon Script, which maps drives/printers.

On a handful of Server 2008 machines, I need to stop this .bat file from running at logon; as on these few servers I am mapping via group policy.

Is there any way to achieve this without removing the Logon Script from the users AD accounts?

HelpDeskECAsked:
Who is Participating?
 
jvfernandezCommented:
you can check the OS Version on the first line of the batch file and if it is windows 2008 do something diferent or just exit the script:

the dos command "ver" returns the OS version, for windows 2008 it's:

Microsoft Windows [Versión 6.0.6002]

so, check the returned string on the first line of the script

ver | find "6002" > nul
if %ERRORLEVEL% == 0 goto exit




:EXIT
exit
0
 
BawerCommented:
create the same copy of the GPO you are using for the all machine, in the copy remove the logon script details and map it to servers OU, its always better to have server and client in different OUs.
0
 
HelpDeskECAuthor Commented:
The logon script isn't run though GP, its defined within active directory under <user> > Profile > Logon script
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
BawerCommented:
then create a new user for the server,, are you using the same user for all ??? :-)
0
 
HelpDeskECAuthor Commented:
Its within a host os VDI enviromnent, so essentially any users from the domain can log into a server 2008 VM, skinned as vista/7.
0
 
jvfernandezCommented:
You can also check the HOSTNAME of the server where the user has logged in and skip the script

if %computername%==windows_2008_server_name goto 2008

then the rest of the script and finally

:2008
exit

But i think the "ver" solution is the best choice tbh
0
 
HelpDeskECAuthor Commented:
The '08 version number is 6.0.6.001, but good solution in priciple. Many thanks
0
 
jvfernandezCommented:
if your "ver" command reports 6.0.6.001 probably you are missing windows 2008 service pack 2
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.