Many of my customers use specific properties for various things. Most users do not have ADUC installed, and some of our customers even disallow installation of ADUC on end user computers. I recently had a user ask about looking up the contents of a specific attribute (extensionAttribute6
, in case you were wondering).
Tag: get-aduser
-
PowerShell: Looking up specific user properties
-
PowerShell: Find many users using their name
Last week, I showed you how I looked up a single user in Active Directory, using the
(more…)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. -
PowerShell: Find User based on partial name
Some time ago, I needed to look up the account names of a handful of users in Active Directory. The information I had beforehand was their names. I did not have ADUC available to me, but I did have PowerShell. This is an excellent use case for the
(more…)Get-ADUser
cmdlet when combined with the-Filter
parameter. Here’s what my first stab at the problem looked like this: -
PowerShell: Default properties
Last week, when describing how to return specific properties, I mentioned that the command returns some standard properties, which is why I didn’t have to specify that it should get the Displayname for the members of the group. What properties are by default returned for the commonly used commands?
(more…) -
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…) -
PowerShell: Find all groups containing a specific string
Sometimes, you need a list of all groups whose name contain a specific string, whether that is in the beginning, middle, or end of the group name. As we’ve seen previously, looking up groups in PowerShell is done with the Get-ADGroup command. Adding the -filter parameter allows us to find groups that satisfy our needs. Using asterisks as wildcards, we can specify whether the string should be at the start, middle, or end:
(more…) -
PowerShell: Getting properties for all user objects in a given OU
Two weeks ago, I showed you how I got some specific properties for a specific user. Perhaps unsurprisingly, the next request from my customer was a similar dump from a specific OU. While the Identity parameter works well when you’re dealing with a specific user, it doesn’t help when you want all users.
(more…) -
Powershell: Retrieving all properties for a given user object
I was asked to provide an overview of all available properties in an Active Directory user object for an upcoming project. As it turns out, that is very easily accomplished. Unsurprisingly, PowerShell has an applet for this. We use the
(more…)Get-ADUser
applet, with the parametersIdentity
to identify the user in question andProperties
with a wildcard to return all properties. -
PowerShell: Count enabled user accounts
A few weeks ago, I showed you how to get a list of all enabled user accounts in PowerShell. Perhaps unsurprisingly, after having presented this to my customer, it transpired that what they really wanted, was to know how many enabled user accounts existed in Active Directory.
(more…) -
PowerShell: Find all users in a specific OU
One of my customers asked for an overview of the UPNs of all users in a specific OU. Having become fairly familiar with the Get-ADUser command, I decided to see if I couldn’t make it do this, too.
(more…)