Share via

Powershell script to list the file types uploaded in SharePoint 2013 online sites.

Anonymous
2016-10-20T22:22:45+00:00

Hi,

Please help me with a script to list all the file types uploaded by the users to the sharepoint 2013 online sites.

Thanks in advance

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2016-10-22T09:39:20+00:00

Hi Priya,

To run the PowerShell script downloaded from this link normally, please make sure:

  1. The following paths to SDK in the script file are collect for your computer:

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"

Add-Type -Path "c:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"

  1. You have imported this module with command below:

Import-Module C:\test\GetSPOListItems9.psm1 -Verbose

Meanwhile, based on my test, we can use the following command to list all unique file types in a document library:

*Get-SPOListItems -Username *****@contoso.onmicrosoft.com -Url https://contoso.sharepoint.com/sites/test/ -AdminPassword Pass -ListTitle Documents -IncludeAllProperties $true -Recursive | select -Property File_x0020_Type -Unique

 

Note: It will take a while to finish running the command.

Regards,

Jiaxing

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2016-10-25T17:58:20+00:00

    Hi Jiaxing,

    Thank you and it worked as you said.

    How do I check for all the site collection.?

    • Priya

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-10-21T18:50:44+00:00

    Hi ,

    I tried that script and received below error

    Get-SPOListItems : The term 'Get-SPOListItems' is not recognized as the name of a cmdlet, function, script file, or 

    operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

    At line:2 char:1

    Could you help me with it.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-10-21T17:28:35+00:00

    Thank you Jiaxing

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2016-10-21T07:51:28+00:00

    Hi Priya,

    We’d suggest you post the question in our MSDN SharePoint forum, which is a specific support channel for PowerShell script for SharePoint Online related issues.

    For your reference, I found a PowerShell script that can list all items with extensions in a specific library.

    GetSpoListItems and GetSPOListFields (Refer to the section Get a list of all documents in a document library)

    Regards,

    Jiaxing

    Was this answer helpful?

    0 comments No comments