I often use the net user
command to have a look at AD groups for a user:
net user /DOMAIN <username>
This works well, however the group names are truncated to around 20 characters. And in my organization, most group names are much longer than this.
Does anyone know of a way to get non-truncated AD groups through the command line?
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
---------------------------------------------------