However, there is a shorter method that may work, using Get-ACL. This would list the owner of the file, what different permissions were one the file, etc. Listing the owner of the file is misleading since mine only came back as "Builtin\Administrators" for everything. This appears to be because I was looking at my desktop. Doing the search on a network drive and it listed the owner as me, my actual domain user. There's an attribute a little farther down called "AccessToString" that lists the permissions. That permission list had my domain user in it for the locally saved files. That list for the network files had a lot more network items in it, but still had my user clearly defined.

This person is a verified professional.

The problem here is that NTFS doesn't have a "Created by" field to work off of. There are two possibilities you can do from here. You can get the owner of the file, which has it's problems, or you can look at the author of the file--as long as that file was created using a MS Office document.

Neither are all that reliable. And to be honest, getting the author information is a royal pain and will only work on some documents.

Getting the owner is fairly easy:

(Get-ACL c:\test.txt).Owner

But if you run it on a folder you'll see that a lot of the time it's the administrator or backup service that "owns" the file.

Actually, that's a good starting point. I had some code from Hey! Scripting Guy and by combining the information from that and the link you provided could actually make the author check fairly reasonable. Still needs some tweaking, but doable.

This person is a verified professional.

Yeah, got something worked up but not sure how useful it will actually be. The problem is the Author field isn't consistent. Sometimes it will be "Last Name, First Name" and other times it will be "First Name Last Name". While not impossible to work with it would be a serious pain. Imagine if they had a middle name, how would you code that?!

And most of the time Author is empty since not too many filetypes use it.

Not really because he is a student and he is not doing any thing malicious. It is poor design in the application that is allowing him to do that (without him even knowing). that is why instead of restricting all the users, i would just rather clean up the server with a script to run in the background.

0

This topic has been locked by an administrator and is no longer open for commenting.