How to add/remove a user from a group in logon script

G

Graham Prentice

We have a machine 'A'. When a user logs into 'A', he should belong to
'A-group'.
If that user logs into machine 'B' he should now be in 'B-group' (but no
longer a member of 'A-group')
Any idea how to do this? I've got Win2k3 server and WinXPe clients (thin
clients)
This is necessary to run an application on the terminal server that depends
on which workstation the user is logged into.
Logon script perhaps? Local to the machine or in Active Dir?
Graham
 
D

Dmitry Korolyov [MVP]

Are you aware that the user in question must have permissions to modify
group membership for both these groups in this scenario? Is it ok for you?

--
Dmitry Korolyov [[email protected]]
MVP: Windows Server - Active Directory


We have a machine 'A'. When a user logs into 'A', he should belong to
'A-group'.
If that user logs into machine 'B' he should now be in 'B-group' (but no
longer a member of 'A-group')
Any idea how to do this? I've got Win2k3 server and WinXPe clients (thin
clients)
This is necessary to run an application on the terminal server that
depends
on which workstation the user is logged into.
Logon script perhaps? Local to the machine or in Active Dir?
Graham
 
G

Graham Prentice

That might be a problem, but I'm willing to risk it for now.
Any ideas of how to add/remove from group membership based on the workstation logged into?
I've been searching for utilities/scripts but have not found exactly what I'm looking for yet.
Graham
Are you aware that the user in question must have permissions to modify group membership for both these groups in this scenario? Is it ok for you?

--
Dmitry Korolyov [[email protected]]
MVP: Windows Server - Active Directory


We have a machine 'A'. When a user logs into 'A', he should belong to
'A-group'.
If that user logs into machine 'B' he should now be in 'B-group' (but no
longer a member of 'A-group')
Any idea how to do this? I've got Win2k3 server and WinXPe clients (thin
clients)
This is necessary to run an application on the terminal server that depends
on which workstation the user is logged into.
Logon script perhaps? Local to the machine or in Active Dir?
Graham
 
D

Dmitry Korolyov [MVP]

You can check if Restricted Groups feature of the Group Policy might be of
any help for you. Are these groups domain groups or local groups on the
terminal server/workstation?

--
Dmitry Korolyov [[email protected]]
MVP: Windows Server - Active Directory


That might be a problem, but I'm willing to risk it for now.
Any ideas of how to add/remove from group membership based on the
workstation logged into?
I've been searching for utilities/scripts but have not found exactly what
I'm looking for yet.
Graham
Are you aware that the user in question must have permissions to modify
group membership for both these groups in this scenario? Is it ok for you?

--
Dmitry Korolyov [[email protected]]
MVP: Windows Server - Active Directory


We have a machine 'A'. When a user logs into 'A', he should belong to
'A-group'.
If that user logs into machine 'B' he should now be in 'B-group' (but
no
longer a member of 'A-group')
Any idea how to do this? I've got Win2k3 server and WinXPe clients
(thin
clients)
This is necessary to run an application on the terminal server that
depends
on which workstation the user is logged into.
Logon script perhaps? Local to the machine or in Active Dir?
Graham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top