11

I have a GPO that I need to apply to the user DOMAIN\DumbGuy, but only when he logs on to DOMAIN\DumbGuysComputer$. When DOMAIN\NiceReceptionist logs on to DOMAIN\DumbGuysComputer$ it should not apply. When DOMAIN\DumbGuy logs on to DOMAIN\ReceptionstsComputer$ it should not apply.

It needs to only only apply to one person on one computer.

If I apply the GPO to the User object, it will apply to all his computers. If I apply the GPO to the Computer object, it will apply to all users on that computer. If I apply it to both, it spreads even wider.

How can I apply a GPO to just one user on just one computer?

abatishchev
  • 541
  • 1
  • 9
  • 31
Mark Henderson
  • 68,823
  • 31
  • 180
  • 259

5 Answers5

12

My suggestion is similar to inhabitant's..

Create a sub-OU just for that single computer, create a GPO in it and set it to loopback merge mode. Use security filtering on the GPO so that only DumbGuy have permissions to apply it. I don't see any reason for using two different GPO's.

Mucho importante! Don't filter the "read" rights from the authenticated users, as the group policy subsystem needs to read the GPO before it applies to the user

pauska
  • 19,620
  • 5
  • 57
  • 75
6

I would look at Group Policy Loopback Processing in conjunction with Security Filtering. You can use the Group Policy loopback feature to apply Group Policy Objects (GPOs) that depend only on which computer the user logs on to.

This is an example of how it can be implemented.

Actually, how would I implement this:

Create two different GPO and assign them to DOMAIN\DumbGuysComputer$.

Configure first GPO with Loopback Processing set in Replace Mode and configure Security Filtering to apply only to DOMAIN\DumbGuy user.

Configure second GPO without Loopback Processing and configure Security Filtering to apply only to DOMAIN\NiceReceptionist users.

Volodymyr Molodets
  • 2,424
  • 9
  • 36
  • 52
5

I would probably just link the GPO to the OU that the user is in and use security filtering or WMI to make sure that it only applies to that one user, then wrap the whole script in a if($ENV:computername -eq whatever){} block.

MDMarra
  • 100,734
  • 32
  • 197
  • 329
0

GPO apply to ether the user object, computer object or both objects in a OU and you can't make the GPO apply only to a computer object only if a certain user logs in to that computer or apply to a user object only if that user logs into a certain computer.

Winter Faulk
  • 471
  • 2
  • 14
0

I created a WMI filter that seems to work:

Select * from WIN32_OperatingSystem where NOT CSName="PCName"

You can test WMI queries in powershell using:

gwmi -Query 'Select * from WIN32_OperatingSystem...'
ThoriumBR
  • 5,302
  • 2
  • 24
  • 34
Mark
  • 1