- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
You may have some clients who are using Accounts Discovery on Windows Machines to locate Privileged Accounts in their environment as part of their Active Directory Cleanup or Maintenance Process. As a result, you will notice that the information provided by an Accounts Discovery scan is very helpful in providing the machine name a local privileged account is discovered within, but as for Domain Accounts it only provides the name of the Domain as the address for the account and the names of all the local groups it was found in that Accounts Discovery considers privileged. Currently as of version 10.2, Accounts Discovery cannot tell you each machine name a privileged Domain Account was found on. Thus, customers feel that this information is not as helpful in determining where domain accounts have privileged access to in their environment as compared to the information provided for local privileged accounts that we discover.
The "Find_Whose_In_Privileged_Groups.ps1" script in this article will help you as an engineer provide your client with more information about what users and groups are directly within the local groups that Accounts Discovery considers privileged. The script parses all the logs within the MachineScans folder to find which users and groups are located directly within the following local groups that are considered privileged by Accounts Discovery (DNA Documentation for Version 8.0 on page 58):
The output of the script is a .CSV file containing all the privileged users and groups found directly in any of the groups above and can be filtered by the following information in Excel:
Important to Note: If a group is discovered nested in any of the Privileged Groups above, the script will only give you the name of the nested group. It is then the responsibility of the client to determine which AD users are within that group.
Scripts are NOT supported by Idira support team. This is example provided. You can always review the machine logs manually without scripting.
The original script with the functionality shown above this point can be found at the end of the page as: Find_Whose_In_Privileged_Groups.ps1
Feature UPDATE V2 (7/12/2019):
An additional feature has been added to the script to query active directory for the domain accounts found by Accounts Discovery and output whether they are "Enabled" or "Disabled" in a new "Account State" column in the CSV file produced by this script.
There are different values produced for the "Account State":
The "Step-by-step" guide above is still the same but the only item that is now required when running the new script is that the system you are running the script from must:
When running the new script you will see errors produced in PowerShell for the AD Groups that cannot be queried properly because they don't exist, but the script will still continue and this is expected behavior. An example of the insignificant error produced if the user does not exist in AD can be seen below:
The new script can be found below as: Find_Whose_In_Privileged_Groups_V2.ps1