Gets shares on servers, CSV of share+folder permissions,files count+total size

Queries multiple Windows computers for their file shares, and writes this information to a csv file and the screen: - the share permissions - the folder permissions of the folder which is shared - the count of files in this folder and subfolders - the total file size

427 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Having issue with report
    2 Posts | Last post September 05, 2018
    • Hi Matt ,
      i able to run script but all share folder showing full permission for everyone which is wrong 
      i check on file server sharing folder having only read permission to user despite that showing wrong report 
      please help me for the fix issue 
    • Hi sorry for the late reply, I don't check this very often and I haven't noticed a way of telling it to email me. I've just run this script again, for a Windows 2012 R2 server although I don't think it matters, and I don't get this problem. 
      When you say "full permission for everyone" do you mean the share permissions or the folder permissions, I mean on the folder which is shared? They're different. First the server applies the share permissions, then the folder permissions. The script gets both, it has to because either one alone won't show what permissions users get. Years ago Microsoft used to recommend that share permissions were set to Everyone Full Control, and only the folder permissions were used to restrict access. I think it's still very common to see file shares set up like this, could this be what you're seeing?
      Here's an example screen output from the script, names removed obviously. I checked that the output csv file also looks ok...
      Getting the shares which are not built-in administrative shares...
      Querying myfileserver...
      2 shares were found on myfileserver
      Processing mysharename on myfileserver
      ServerName        : myfileserver
      ShareName         : mysharename
      SharePermissions  : BUILTIN\Administrators: FullControl; mydomain\myusename: ReadAndExecute, Synchronize
      FolderPath        : C:\myparentfolder\myfoldername
      FolderPermissions : mydomain\myusename2: DENY Modify; mydomain\myusename: FullControl; mydomain\myusename3: FullControl
      FilesCount        : 1
      FilesSizeGB       : 0.00
      Writing the output file c:\users\username\documents\Get-SharePermissions.ps1-Output-2018.09.05-22.34.22.csv