windows: Get user’s non-truncated Active Directory

windows: Get user’s non-truncated Active Directory

Asked on October 25, 2018 in Windows.
Add Comment


  • 5 Answer(s)

    It should be parse the output from the GPRESULT command.

    Answered on October 25, 2018.
    Add Comment

        GPRESULT is the right command, but it cannot be run without parameters. /v or verbose option is difficult to manage without also outputting to a text file. E.G. I recommend to use:

    gpresult /user myAccount /v > C:\dev\me.txt--Ensure C:\Dev\me.txt
    
    Answered on October 25, 2018.
    Add Comment

      Use dsquery and dsget:

    dsquery user domainroot -name <userName> | dsget user -memberof
    

       To retrieve group memberships something like this:

    Tue 09/10/2013 13:17:41.65
    C:\
    >dsquery user domainroot -name jqpublic | dsget user -memberof
    "CN=Technical Support Staff,OU=Acme,OU=Applications,DC=YourCompany,DC=com"
    "CN=Technical Support Staff,OU=Contosa,OU=Applications,DC=YourCompany,DC=com"
    "CN=Regional Administrators,OU=Workstation,DC=YourCompany,DC=com"
    

       It is important to  install this Remote Server Administration Tools for Windows 7.

    Answered on October 26, 2018.
    Add Comment

    GPRESULT is the right command, but it cannot be run without parameters./v or verbose option is difficult to manage without also outputting to a text file. E.G. I recommend using

    gpresult /user myAccount /v > C:\dev\me.txt–Ensure C:\Dev\me.txt exists

    Another option is to display summary information only which may be entirely visible in the command window:

    gpresult /user myAccount

     GPRESULT is the right command, but it cannot be run without parameters. /v or verbose option is difficult to manage without also outputting to a text file. E.G. I recommend to use:

    1
    gpresult /user myAccount /v > C:\dev\me.txt--Ensure C:\Dev\me.txt
    Answered on January 19, 2019.
    Add Comment

    you could use dsquery and dsget:

    dsquery user domainroot -name <userName> | dsget user -memberof
    

    To retrieve group memberships something like this:

    Tue 09/10/2013 13:17:41.65
    C:\
    >dsquery user domainroot -name jqpublic | dsget user -memberof
    "CN=Technical Support Staff,OU=Acme,OU=Applications,DC=YourCompany,DC=com"
    "CN=Technical Support Staff,OU=Contosa,OU=Applications,DC=YourCompany,DC=com"
    "CN=Regional Administrators,OU=Workstation,DC=YourCompany,DC=com"
    

    Although I can’t find any evidence that I ever installed this package on my computer, you might need to install the Remote Server Administration Tools for Windows 7.

    Answered on January 19, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.