Logon Script
I have a logon script that changes the power config on my users workstations and this works great. The problem is that when I use the same script it sets those options on my servers as well. How can I prevent this while leaving my logon script alone.
January 12th, 2010 5:55pm

The logon script can check for the string "Server" in the operatingSystem attribute of the local computer object. For example, if this is a VBScript logon script: ' Retrieve DN of local computer. Set objSysInfo = CreateObject("ADSystemInfo") strComputerDN = objSysInfo.ComputerName ' Bind to computer object. Set objComputer = GetObject("LDAP://" & strComputerDN) ' Retrieve operatingSystem. strOS = objComputer.operatingSystem ' Check if Server OS. If (InStr(LCase(strOS), "server") > 0) Then ' This is a server. Abort logon script. Wscript.Quit End If ' Remainder of logon script... I believe something similar can be done in a batch file, using the Ver command.Richard MuellerMVP ADSI
Free Windows Admin Tool Kit Click here and download it now
January 12th, 2010 6:21pm

Hi,are you set this logon script policy on Default Domain Policy?if it is you better make an OU and move domain users to the OU and set your policy on it I hope it help
January 12th, 2010 6:21pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics