policy to assign logon script by site

  • Thread starter Thread starter NN
  • Start date Start date
N

NN

If a Logon Script is assigned in the User Configuration section of a GPO and
it is then linked to a site in AD Sites and Services, will the script run
for users when they log into computers located at that site but not when
they log into computers at other sites?

Here is the situation. My employer has a Windows 2000 domain with several
physical locations. Each site has a server hosting a share which is mapped
as an N: drive for all users. If a user goes to a different site and logs
in, they need to get that site's N: drive, not the one from their home
location. I am trying to come up with a way to automate this process.

I could copy a script file to each PC and then create a Local Policy to run
it for users on each one by creating a Group Policy MMC snap-in. This would
be faster than physically going to each machine and mapping the drive for
each user, but it is not a very elegant solution.

I don't want to enable Loopback Processing for every machine on the domain
as this would doubtless cause more problems than it solved.

Is there any way to accomplish this goal using Group Policy?
 
If a Logon Script is assigned in the User Configuration section of a GPO and
it is then linked to a site in AD Sites and Services, will the script run
for users when they log into computers located at that site but not when
they log into computers at other sites?

Here is the situation. My employer has a Windows 2000 domain with several
physical locations. Each site has a server hosting a share which is mapped
as an N: drive for all users. If a user goes to a different site and logs
in, they need to get that site's N: drive, not the one from their home
location. I am trying to come up with a way to automate this process.

I could copy a script file to each PC and then create a Local Policy to run
it for users on each one by creating a Group Policy MMC snap-in. This would
be faster than physically going to each machine and mapping the drive for
each user, but it is not a very elegant solution.

I don't want to enable Loopback Processing for every machine on the domain
as this would doubtless cause more problems than it solved.

Is there any way to accomplish this goal using Group Policy?
If you network ALWAYS validated a user from a DC at the site they were currently at,
you could have a common logon.bat test where the DC is an run the approprtiate mapping.

To be safe, I would have a common logon.bat for all sites.
Lets assume that SITE A 192.168.0.xxx
SITE B 192.168.1.xxx
SITE C 192.168.2.xxx
SITE D 192.168.3.xxx
etc....

A common logon script could:

@echo off
setlocal
for /f "Tokens=*" %%a in ('ipconfig^|Findstr /L /I /C:"IP Address"') do (
for /f "Tokens=2 Delims=:" %%b in ('@echo %%a') do (
set IP=%%b
)
)
set IP=%IP:~1%
if "%IP:~0,10%" EQU "192.168.0." goto sitea
if "%IP:~0,10%" EQU "192.168.1." goto siteb
if "%IP:~0,10%" EQU "192.168.2." goto sitec
if "%IP:~0,10%" EQU "192.168.3." goto sited
goto error
:sitea
net use n: \\servera\share
goto common
:siteb
net use n: \\serverb\share
goto common
:sitec
net use n: \\serverc\share
goto common
:sited
net use n: \\serverd\share
:common


endlocal

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top