Search results for: “get-aduser”

  • 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 Get-ADUser applet, with the parameters Identity to identify the user in question and Properties with…

  • 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. Once more, my Google-fu put me on the…

  • 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. I knew that I would need to filter the results of the command on OU, and found…

  • PowerShell: Find all enabled user accounts

    Some time ago, I was asked to provide a list of all enabled user accounts in Active Directory. My thoughts immediately went to PowerShell, assuming that there would be tools available to achieve that task. I knew that the Get-ADUser query, combined with a parameter, would likely be the ticket. Using the -ldapfilter parameter to…

  • PowerShell: Building a script to find all members of several given groups

    Last week, I showed you how I find all the nested members of a specified group. When we get requests for such audits, however, they usually specify doing so for a number of groups. Now, we could of course do it, one group at a time, adding information to our output as we go, however…

  • Building a script to find all members of a given group

    Some time ago, I was asked to provide a list of everyone with access to a specific system. After communicating with the client, it transpired that they were particularly interested in knowing who were the members of a set of Active Directory groups. While this can be done manually, I wanted to try my hand…

  • Exporting AD group members’ display name

    Five years ago, I showed you how to export a list of members of an Active Directory group, using a command line query. One issue I’ve run into using this query, is that I get their user name, not their actual name, which tends to make the resulting list hard to parse. As I had…