?
Solved

Find files owned by specific users in a shared directory/sub directories

Posted on 2012-08-15
2
Medium Priority
?
929 Views
Last Modified: 2012-08-15
Hi All,

I'm trying to get a list of files owned by specific users in a network share on server 2008 R2.
Tried icacls <path> /findsid <username> but this is incorrect.

How can I do this and output the results to a file?
is there a command or powershell method for this?

Thank you.
0
Comment
Question by:sid20vt
2 Comments
 

Accepted Solution

by:
sid20vt earned 0 total points
ID: 38295618
Found this utility:
file searcher by owner from grimadmin.com

Works well.
0
 
LVL 9

Expert Comment

by:chrismerritt
ID: 38295624
Was going to say, something like this would work in PowerShell as well, you could filter the results as appropriate:

$NetworkSharePath = "X:\Technical\"

$Files = gci $NetworkSharePath -recurse | ? {$_.PsIsContainer -eq $False}
foreach ($File in $Files)
{
	Write-Host "Processing File: $($File.FullName)"
	$File | Add-Member -MemberType "NoteProperty" -Name "Owner" -Value (($File | Get-Acl).Owner.ToString())
}

$Files | Select FullName, Owner

Open in new window

0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
Transferring FSMO roles is done when an admin wants to split roles between certain Domain Controllers or the Domain Controller holding the Roles has been forcefully demoted using dcpromo / forceremoval
This tutorial will give a short introduction and overview of Backup Exec 2012 and how to navigate and perform basic functions. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as conne…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question