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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
BawerCommented:
then create a new user for the server,, are you using the same user for all ??? :-)
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.