Link to home
Start Free TrialLog in
Avatar of Pau Lo
Pau Lo

asked on

sharepoint inventory of files

does anyone know of any scripts which can document all files in a sharepoint environment, with the basics like filename, path, file added/created, file last edited, file last accessed. This is for sharepoint 2013?
ASKER CERTIFIED SOLUTION
Avatar of Piotr Strycharz
Piotr Strycharz
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Pau Lo
Pau Lo

ASKER

is there a pre-requisite for get-spwebapplication - I ran it on a sharepoint app server using powershell ISE, and it did not recognise that command at all.
This should run on all SharePoint servers. Are you sure you run this script in SharePoint 2013 PowerShell console?
Avatar of Pau Lo

ASKER

or should it be run within sharepoint management shell?
Avatar of Pau Lo

ASKER

ah - from within the sharepoint 2013 management shell it does recognise get-spwebapplication - I was trying to run it using standard powershell ISE
Avatar of Pau Lo

ASKER

Something is still a miss, we know there are approx. 7000 documents but it only returns approx. 70 rows. Is there a way to specify a specific web application and see if that produces a fuller report?
The script lists all web applications. If you want to specify an application - remove outer loop (first, and last line in the script) and in the first line say:

$app=Get-SPWebApplication http://my-application

Open in new window


You may not have access to all the documents. Check the script output - it says what list is being processed and how many items it has. Compare to results you get.
Avatar of Pau Lo

ASKER

Ah yeah, lots of access denied type errors :(
You must use site collection admin account for all the sites. One of the solutions is to use application pool account, or even Central Admin pool account.