Monday, December 5, 2011

how to get users from a shared folder

Hi there,

this is a very useful command for get users from a shared folder.

#Get the ACL on the existing folder

$USERACL = get-acl "\\server\share\folder"

#Show the ACL

write-host "ACL entry is "

$USERACL | format-list
Copy the above into a notepad, modify the  "\\server\share\folder" to your location of the share and save as a *.ps1 file.


Open Powershell and browse to your *.ps1 location and run it. it should give you a list BUT make sure that YOU too have permission on the share.

Alternatively after modifying share location, you can paste the commands directly in powershell and get the same results.

No comments:

Post a Comment