Solved

Create a script with powershell or DOS

Posted on 2015-01-16
1
136 Views
Last Modified: 2015-01-28
Haven't done much scripting myself, so I need advise, and a solution to whether it's possible to create output in the form of a spreadsheet using either Powershell or DOS scripting and gather the following information:

- A spreadsheet list of all root folders, with a list of the user(s) and/or group(s) with their permission level to these individual folders and the group membership of each group listed.

Time is short to do this, so if there is already a prepared example or 'canned' solution to perform this action, please let me know. Thanks.
0
Comment
Question by:nurturer69
1 Comment
 
LVL 29

Accepted Solution

by:
becraig earned 500 total points
ID: 40554568
Here is a script I found on spiceworks since you are in a rush:

$OutFile = "C:\Permissions.csv"
$Header = "Folder Path,IdentityReference,AccessControlType,IsInherited,InheritanceFlags,PropagationFlags"
Del $OutFile
Add-Content -Value $Header -Path $OutFile 

$RootPath = "C:\Test"

$Folders = dir $RootPath -recurse | where {$_.psiscontainer -eq $true}

foreach ($Folder in $Folders){
	$ACLs = get-acl $Folder.fullname | ForEach-Object { $_.Access  }
	Foreach ($ACL in $ACLs){
	$OutInfo = $Folder.Fullname + "," + $ACL.IdentityReference  + "," + $ACL.AccessControlType + "," + $ACL.IsInherited + "," + $ACL.InheritanceFlags + "," + $ACL.PropagationFlags
	Add-Content -Value $OutInfo -Path $OutFile
	}

Open in new window



http://community.spiceworks.com/scripts/show/1070-export-folder-permissions-to-csv-file
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do I delete 2 44
move command 5 67
Coding yesterday's date 3 46
Oracle DB Slows After Datapump Until Next Reboot 27 132
Hello I read in a discussion about a person who configured a very simple mirror RAID with two hard drives; the system and data were on the same partition. He asked how to repair the system as it was not booting up anymore. In his case running …
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

733 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