- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
05-07-2025 11:11 AM
Im trying to figure out how to write a script to search for the DWORD values of "State" and "RefCount" that = 1 in the sub folders (profiles) in the hive: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList Then show the hostname, and data in the String "ProfileImagePath" in the results of which has a 1 in State or RefCount
My ultimate goal is to make a list of accounts on machines that are possibly corrupted. These vales seem to be the best way to see what accounts could be corrupted. Cortex XDR
05-12-2025 11:34 PM
Hello @J.Suter ,
You may need PS engagement or a Script Expert to create the powershell script to achieve your goal. Once the script is ready:
Go to Action Center > Scripts > Create Script
Upload this PowerShell code under Custom Script
Run against a test endpoint first
Target machines in bulk using filters or incident context
Review results under Script Results tab
Please reach out to Accounts Team for more information:
If you feel this has answered your query, please let us know by clicking like and on "mark this as a Solution". Thank you.
05-13-2025 05:35 AM
Hi @J.Suter,
There is already an OOTB script that allows you to get a registry value, it's called "registry_get".
You can download the script and modify it as needed, it comes with very descriptive comments to let you know what each part of the script does.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!