Last week, I showed you how I looked up a single user in Active Directory, using the Get-ADUser
cmdlet. I noted that I had an issue with finding some users due to spelling errors. This wasn’t a problem when I was doing them individually, but I soon found myself needing to do the same for more than a hundred users.
Tag: samaccountname
-
PowerShell: Find many users using their name
-
PowerShell: Return multiple specific properties
The script I described a few weeks ago for finding all members of several groups is serving me very well indeed. I was recently asked to provide both the display name and the login name for each member in the group. This was readily achieved by modifying the script slightly. The rest of the script remains the same, so I will leave that well enough alone, and start with the following snippet:
(more…)Get-ADGroupMember $Group -recursive | Get-ADUser -property Displayname | select Displayname
-
A better way of finding users’ group memberships
More than six years ago, I wrote a post, detailing how I could identify users’ Active Directory group memberships. While the method I detailed certainly works, it isn’t as simple as it might have been. Having recently found myself needing to perform that very same task again, I decided to revisit this topic, to show how I did it this time around.
(more…)