Powershell script for deploying printers on Remote Desktop Servers

Jun 11, 2014 at 1:39 AM
Hi everyone,

I was wondering if anyone could point me in the right direction as I'm new to powershell scripting. I'm trying to deploy location based printing on 2008R2 RDS servers. I've tried it with GPP but have encountered a lot of issues with item level targeting and am therefore looking at a powershell script.

I essentially want to write a script that will:
a) Delete old printer mappings (don't want printers to follow users around between RDS servers)
b) Get the user's client pc names (wildcards would be great as all PCs in each department have the same prefix so PCs in accounting would start with Acc*) (or IP range) when they are logged on to a terminal services session.
c) Use the client name to map a specific printer.

Is this possible with the terminal services powershell module? If so, can someone please point me in the right direction?

Thanks,
HA1
Coordinator
Jun 12, 2014 at 7:42 AM
Hi

I suggest you post this on a PowerShell forum, it will likely get more attention there.
Nov 18, 2014 at 11:28 AM
Hey I am looking for a solution to the same problem.

I'd like to use the GPP Item level targeting based on IP address for my RDS users. Trouble is the physical location of the user will change, and does not correlate with the IP address of the RDP server.

How do we get the GPP targeting to pick up the location of the RDS client, NOT the server?

If you could pass on any helpful info, I'd be most obliged.

Cheers,
Tom