Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Reply To: Combine 2 output CSVs into one?

$
0
0

You can. It’s a bit tricky.

The problem is that your CSV file with permissions will have many different rows for each file, depending on how many permissions the file has. That’s called a hierarchical structure (each file has multiple permissions), and CSV isn’t a good way to maintain that information. CSV is good for flat files, not hierarchical relationships. XML would be a better way to store the hierarchical relationship.

What’s the purpose of this file? If it’s to produce a report, it might be better to put the information into SQL Server Express. You could set up a table for files, and a table for permissions, and let the two relate to each other. You could then use SQL Server Reporting Services to produce some pretty awesome reports, very easily. PowerShell would just populate the database (it’s good at that), and SSRS would produce reports (it rocks at that).

(and it’s difficult to determine who last accessed a file – you’d need to be auditing that, and you’d need to scan the server’s Security event log for entries, and that would be incredibly time-consuming for PowerShell; it’s why companies like Dell make money selling auditing software that does this).


Viewing all articles
Browse latest Browse all 13067

Trending Articles