Get user's non-truncated Active Directory groups from command line

前端 未结 7 717
南旧
南旧 2021-01-30 00:46

I often use the net user command to have a look at AD groups for a user:

net user /DOMAIN 

This works well, howeve

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-30 01:17

    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 /r

    The accounts are listed under the heading:

    The user is a part of the following security groups
    ---------------------------------------------------
    

提交回复
热议问题