Search for users 'Log on to' rights

Posted on 2009-12-23
Last Modified: 2013-12-04
There were some users that were created in active directory with the improper 'Log on to' permission (under the account tab in users). I would like to go through and check all users to ensure they have the proper permissions. Is there a simple way to do this without opening each user and checking under the 'Log on to' button?

I am looking for all users to have 'Log on to' rights for 'Server1' and 'Server2'.
Question by:menreeq
    LVL 57

    Accepted Solution

    I like using adfind by MVP Joe Richards for things like this
    userworkstations is the key attribute here
    If you want to dump the attribute for all users use
    adfind -default -f "&(objectcategory=person)(objectclass=user)" samaccountname userworkstations -csv  > c:\users.csv
    if you want to just find users who have server1 and server2 set
    adfind -default -f "&(objectcategory=person)(objectclass=user)(userworkstations=server1)(userworkstations=server2)" samaccountname userworkstations -csv  > c:\usersServers.csv
    In my examples I've sent the output to a CSV file on the C drive.
    Let me know if that works ok.

    Author Closing Comment

    perfect, saved me lots of time

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
    Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
    This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
    This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now