Site GPO to fire on TS client IP, not server.

I am the admin of a small business network. The majority of users are terminal server based, running TS sessions against 3 terminal servers in the head office. Several branch offices are connected via a private VPN, these have their own workstations (mostly Wyse terminals), and printers.

What I want to do is have printers on the remote sites automatically mapped, when users connect there. Ordinarily, this could be done via a GPO applied to the site, however this will not work as it will be processed as the terminal server IP, not the client.

For example, head office has a range, remote office has  A travelling user drags a laptop into the remote office, plugs it in and gets an IP of He connects to the a terminal server in the head office at, and logs on to do some work.

What I would like is for printers in the remote office, on the subnet to be automatically mapped, for this user.  I don't want to redirect back to printers on the client machine itself, I want the printer installed on the TS itself, and spooled through the local printer queues.

Any ideas?
LVL 22
Mal OsborneAlpha GeekAsked:
Who is Participating?

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

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.

yo_beeDirector of Information TechnologyCommented:
I wrote an article a while back outlining the steps to leverage Group Policy Preferences (GPP) within GPO.

The article shows how to use security groups to control how printers are deployed, but you can easily focus on Computer Name or even IP-Address.

Hope this article guide you in the direction you are looking for.

The other option is using Security Filtering or WMI Filtering, but that would warrant Loopback setting to be configured.  I think the easier method of management for this is GPP w/ Item Level Targeting enabled.
I don't see how you can do it. Group policy works on user object or computer object, and can be based upon site. However, you want to fire a script if a user is on a terminal server from an office that the don't normally connect from. Looking at the session variables on a terminal server, I can see that I have a remote session, but I can't tell from where, and that's what you really need. If there was a way to determine that, you could run a login script on the terminal server to extract that information and add the print queues.

The "normal" way to solve this would be to add printers to the laptop based upon GPP that applies to the AD site that the laptop is in, but the printers would map to the laptop, not directly to the terminal session.

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
ChrisSenior Technical ArchitectCommented:
you won't be able to do it based on the Wyse terminal IP as its not where the client login is happening from
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 2008

From novice to tech pro — start learning today.