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.