Search results for: “get-adgroup”

  • 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?

  • 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…

  • Powershell: A script to find all members of several groups refined

    One of the scripts that I use most often is the one I wrote about back in September of 2019. Usually, I only run it for up to ten or so groups, so it’s not a big problem to simply swap out the group name, rince and repeat. Recently, however, I needed to run it…

  • 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…

  • Finding all groups without a manager in a specific OU in AD

    Last week, I showed you how you can easily find the OU to use when looking for the members of a specific OU. Today, I’d like to show you how I use that information. The background was that we use AD groups to control access to network shares. In order for IT support to know…

  • Finding the full OU path of an AD OU

    Using PowerShell, I was building a script to identify a subset of the groups in a given organizational unit (OU). As you may know, these are built up of subsections with the prefixes CN (common name) and DC (Domain Component). In order to have the script run successfully, you need to specify the OU using…

  • 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.…

  • 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…