Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Script to Find Specific Folder in User Profiles

Here's a brain buster for everyone.  I know there is a way.  

Goal: Find a specific folder located in user profile appdata\romaing 

I need the results to tell me which user profile has the specific folder.  

Example:

If FolderA is found in user profiles 1, 2, and 3, then I need the script to return which user profile has that folder.

 

1

Comments

1 comment
Date Votes
  • If you're looking to scan for that data with Inventory, I recommend a Files & Directories Scanner. The Include Pattern would look something like this:

    %SystemDrive%\Users\**\AppData\Roaming\Target Folder

    Here's the PowerShell way:

    Get-ChildItem "$env:SystemDrive\Users\*\AppData\Roaming\Target Folder"
    1