Disable option In Active Directory for 1300 Users (Urgent) Please help

"Deny this user permission to log on to Remote Desktop Session Host server"
Hello All,

I am posting this question once again as I need a script or any other procedure to extract AD user account who have ""Deny this user permission to log on to Remote Desktop Session Host server" option enabled. I have 10000 plus users and I dont know who all have this enabled, I need to find out who has this enabled and disable it for all of them. I am running with Powershell 4 version. One of the expert gave me a script as below and it also gave me an error. I would request any expert in Active Directory to help me ASAP for a solution to this. Please Please help.

Another option is if I can get a script or way to disable for all AD user object in the domain.
Pavan JoshiAsked:
Who is Participating?
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.

hvdhelmCommented:
A quick gui tools:
-Cjwdev Tidy
-ADModify
0
Pavan JoshiAuthor Commented:
-ADModify is not aloowing me to select terminal services as its 2008 R2 I am using
0
nagendra prasadSr System AdministratorCommented:
open Group Policy
under computer configuration / windows settings / security settings / local policies / user rights assignment

there are 2 entries, Deny logon locally and Deny logon through Terminal Services.

Add your user (or better still create a group and add that) to the most applicable policy that includes the servers you want to protect.
Deny-logon-Setting-in-GP.png
0

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
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
Active Directory

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.