Introduction
In some cases we will have huge files uploaded to SharePoint. When we hear huge files the first thing that comes to our mind is video files. This article explains how to find the uploaded video files in SharePoint 2010 using a PowerShell script.
Planning
Before developing a script to find the uploaded video files, first we must capture the available video file formats. Thus I started capturing the possible extensions and captured nearly all of them. The various video file formats are available in the attached Excel worksheet.
Functionality
The script captures the following information base on the choice you enter on the execution screen:
- All the video files details in the Farm
- All the video files details under a specific web application
- All the video files details under a specific site collection
- All the video files details under a specific site or web
Functions
The script has 4 functions to perform each of the tasks as said in the functionality section.
The video files are uploaded in Document Library. So the script parses through each item in document libraries and captures the information.
Function 1
The following piece of code helps you to find all the video files uploaded to the Farm.
- Function VideoFilesInFarm
- {
- $output = $scriptbase + "\" + "FarmWideVideoFiles.csv"
- "SiteCollection" + "," + "WebURL" + "," + "ListName" + "," + "ItemID" + "," + "ItemName" | Out-File -Encoding Default -FilePath $Output;
- write-host "Capturing video files info on the sharepoint farm" -fore magenta
- $sites = get-spsite -limit all
- foreach($site in $sites)
- {
- write-host "Processing site collection " $site.url -fore Magenta
- foreach($web in $site.allwebs)
- {
- write-host "Processing site/web " $web.url -fore yellow
- foreach($list in $web.lists)
- {
- if($List.BaseType -eq "DocumentLibrary")
- {
- write-host "Processing list " $list.title " under site " $web.url -fore cyan
- foreach($item in $list.items)
- {
- if($item.name.contains(".aep") -or $item.name.contains(".sfd") -or $item.name.contains(".rms") -or $item.name.contains(".dzm") -or $item.name.contains(".fcp") -or $item.name.contains(".psh") -or $item.name.contains(".usm") -or $item.name.contains(".sbk") -or $item.name.contains(".wp3") -or $item.name.contains(".wpl") -or $item.name.contains(".dir") -or $item.name.contains(".wlmp") -or $item.name.contains(".piv") -or $item.name.contains(".mswmm") -or $item.name.contains(".veg") -or $item.name.contains(".3gp") -or $item.name.contains(".scm") -or $item.name.contains(".trp") -or $item.name.contains(".swf") -or $item.name.contains(".webm") -or $item.name.contains(".m4v") -or $item.name.contains(".mpeg") -or $item.name.contains(".bdmv") -or $item.name.contains(".dzt") -or $item.name.contains(".gfp") -or $item.name.contains(".m21") -or $item.name.contains(".mproj") -or $item.name.contains(".mvp") -or $item.name.contains(".nuv") -or $item.name.contains(".rdb") -or $item.name.contains(".rmp"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".rv") -or$item.name.contains(".screenflow") -or $item.name.contains(".swt") -or $item.name.contains(".vcpf") -or $item.name.contains(".viewlet") -or $item.name.contains(".dnc") -or $item.name.contains(".wm") -or $item.name.contains(".mkv") -or $item.name.contains(".srt") -or $item.name.contains(".avi") -or $item.name.contains(".vob") -or $item.name.contains(".prproj") -or $item.name.contains(".mani") -or $item.name.contains(".m2p") -or $item.name.contains(".meta") -or $item.name.contains(".rec") -or $item.name.contains(".msdvd") -or $item.name.contains(".tp") -or $item.name.contains(".wmv") -or $item.name.contains(".asf") -or $item.name.contains(".dzp") -or $item.name.contains(".bik") -or $item.name.contains(".bnp") -or $item.name.contains(".mp4.infovid") -or $item.name.contains(".gvi") -or $item.name.contains(".aepx") -or $item.name.contains(".vro") -or $item.name.contains(".amc") -or $item.name.contains(".bin") -or $item.name.contains(".mpg") -or $item.name.contains(".fbr"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mts") -or $item.name.contains(".nvc") -or $item.name.contains(".ifo") -or $item.name.contains(".swi") -or $item.name.contains(".ism") -or $item.name.contains(".amx") -or $item.name.contains(".ts") -or $item.name.contains(".vsp") -or $item.name.contains(".kmv") -or $item.name.contains(".dcr") -or $item.name.contains(".hdmov") -or $item.name.contains(".pds") -or $item.name.contains(".3gp2") -or $item.name.contains(".pac") -or $item.name.contains(".trec") -or $item.name.contains(".vc1") -or $item.name.contains(".wmx") -or $item.name.contains(".bu") -or $item.name.contains(".mmv") -or $item.name.contains(".vp3") -or $item.name.contains(".cpi") -or $item.name.contains(".mp4") -or $item.name.contains(".mob") -or $item.name.contains(".mov") -or $item.name.contains(".bdm") -or $item.name.contains(".scc") -or $item.name.contains(".dcr") -or $item.name.contains(".3g2") -or $item.name.contains(".f4v") -or $item.name.contains(".flv") -or $item.name.contains(".r3d"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".xvid") -or $item.name.contains(".avchd") -or $item.name.contains(".dmx") -or $item.name.contains(".m1pg") -or $item.name.contains(".mnv") -or $item.name.contains(".roq") -or $item.name.contains(".ttxt") -or $item.name.contains(".wve") -or $item.name.contains(".f4f") -or $item.name.contains(".ivf") -or $item.name.contains(".k3g") -or $item.name.contains(".lsx") -or $item.name.contains(".lvix") -or $item.name.contains(".mvc") -or $item.name.contains(".playlist") -or $item.name.contains(".qt") -or $item.name.contains(".spl") -or $item.name.contains(".vcr") -or $item.name.contains(".w32") -or $item.name.contains(".dat") -or $item.name.contains(".vp6") -or $item.name.contains(".vpj") -or $item.name.contains(".3mm") -or $item.name.contains(".str") -or $item.name.contains(".vgz") -or $item.name.contains(".dav") -or $item.name.contains(".smv") -or $item.name.contains(".camproj") -or $item.name.contains(".divx") -or $item.name.contains(".dvdmedia") -or $item.name.contains(".fcproject"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".ismv") -or $item.name.contains(".otrkey") -or $item.name.contains(".sqz") -or $item.name.contains(".tix") -or $item.name.contains(".yuv") -or $item.name.contains(".clpi") -or $item.name.contains(".dvr") -or $item.name.contains(".f4p") -or $item.name.contains(".fli") -or $item.name.contains(".hdv") -or $item.name.contains(".rsx") -or $item.name.contains(".inp") -or $item.name.contains(".m15") -or $item.name.contains(".mpeg4") -or $item.name.contains(".rmvb") -or $item.name.contains(".video") -or $item.name.contains(".ogv") -or $item.name.contains(".lrv") -or $item.name.contains(".dxr") -or $item.name.contains(".mvp") -or $item.name.contains(".wmd") -or $item.name.contains(".dv4") -or $item.name.contains(".h264") -or $item.name.contains(".aetx") -or $item.name.contains(".db2") -or $item.name.contains(".mod") -or $item.name.contains(".sfera") -or $item.name.contains(".ajp") -or $item.name.contains(".rm") -or $item.name.contains(".mxf") -or $item.name.contains(".3gpp"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".m2t") -or $item.name.contains(".pmf") -or $item.name.contains(".dash") -or $item.name.contains(".ale") -or $item.name.contains(".avp") -or $item.name.contains(".bsf") -or $item.name.contains(".dmsm") -or $item.name.contains(".dream") -or $item.name.contains(".imovieproj") -or $item.name.contains(".moi") -or $item.name.contains(".3p2") -or $item.name.contains(".aaf") -or $item.name.contains(".arcut") -or $item.name.contains(".avb") -or $item.name.contains(".avv") -or $item.name.contains(".bdt3") -or $item.name.contains(".bmc") -or $item.name.contains(".ced") -or $item.name.contains(".cine") -or $item.name.contains(".cip") -or $item.name.contains(".cmmp") -or $item.name.contains(".cmmtpl") -or $item.name.contains(".cmrec") -or $item.name.contains(".cst") -or $item.name.contains(".d2v") -or $item.name.contains(".d3v") -or $item.name.contains(".dce") -or $item.name.contains(".dck") -or $item.name.contains(".dmsd") -or $item.name.contains(".dmss") -or $item.name.contains(".dpa"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".evo") -or $item.name.contains(".eyetv") -or $item.name.contains(".fbz") -or $item.name.contains(".ffm") -or $item.name.contains(".flc") -or $item.name.contains(".flh") -or $item.name.contains(".fpdx") -or $item.name.contains(".ftc") -or $item.name.contains(".gcs") -or $item.name.contains(".gifv") -or $item.name.contains(".gts") -or $item.name.contains(".hkm") -or $item.name.contains(".imoviemobile") -or $item.name.contains(".imovieproject") -or $item.name.contains(".ircp") -or $item.name.contains(".ismc") -or $item.name.contains(".ivr") -or $item.name.contains(".izz") -or $item.name.contains(".izzy") -or $item.name.contains(".jss") -or $item.name.contains(".jts") -or $item.name.contains(".jtv") -or $item.name.contains(".kdenlive") -or $item.name.contains(".m21") -or $item.name.contains(".m2ts") -or $item.name.contains(".m2v") -or $item.name.contains(".mgv") -or $item.name.contains(".mj2") -or $item.name.contains(".mk3d") -or $item.name.contains(".mp21"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mpgindex") -or $item.name.contains(".mpls") -or $item.name.contains(".mpv") -or $item.name.contains(".mse") -or $item.name.contains(".mtv") -or $item.name.contains(".mvd") -or $item.name.contains(".mve") -or $item.name.contains(".mxv") -or $item.name.contains(".ncor") -or $item.name.contains(".nsv") -or $item.name.contains(".ogm") -or $item.name.contains(".ogx") -or $item.name.contains(".photoshow") -or $item.name.contains(".plproj") -or $item.name.contains(".ppj") -or $item.name.contains(".pro") -or $item.name.contains(".prtl") -or $item.name.contains(".pxv") -or $item.name.contains(".qtl") -or $item.name.contains(".qtz") -or $item.name.contains(".rcd") -or $item.name.contains(".rum") -or $item.name.contains(".rvid") -or $item.name.contains(".rvl") -or $item.name.contains(".sdv") -or $item.name.contains(".sedprj") -or $item.name.contains(".seq") -or $item.name.contains(".sfvidcap") -or $item.name.contains(".siv") -or $item.name.contains(".smi"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".smk") -or $item.name.contains(".stl") -or $item.name.contains(".svi") -or $item.name.contains(".tda3mt") -or $item.name.contains(".tivo") -or $item.name.contains(".tod") -or $item.name.contains(".tp0") -or $item.name.contains(".tpd") -or $item.name.contains(".tpr") -or $item.name.contains(".tsp") -or $item.name.contains(".tvlayer") -or $item.name.contains(".tvshow") -or $item.name.contains(".usf") -or $item.name.contains(".vbc") -or $item.name.contains(".vcv") -or $item.name.contains(".vdo") -or $item.name.contains(".vdr") -or $item.name.contains(".vfz") -or $item.name.contains(".vlab") -or $item.name.contains(".wcp") -or $item.name.contains(".wmmp") -or $item.name.contains(".wvx") -or $item.name.contains(".xej") -or $item.name.contains(".xesc") -or $item.name.contains(".xfl") -or $item.name.contains(".xlmv") -or $item.name.contains(".y4m") -or $item.name.contains(".zm1") -or $item.name.contains(".zm2") -or $item.name.contains(".zm3") -or $item.name.contains(".lrec"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mp4v") -or $item.name.contains(".mpe") -or $item.name.contains(".mys") -or $item.name.contains(".par") -or $item.name.contains(".aqt") -or $item.name.contains(".gom") -or $item.name.contains(".mpv2") -or $item.name.contains(".orv") -or $item.name.contains(".rmv") -or $item.name.contains(".ssm") -or $item.name.contains(".zeg") -or $item.name.contains(".camrec") -or $item.name.contains(".zmv") -or $item.name.contains(".aec") -or $item.name.contains(".box") -or $item.name.contains(".arf") -or $item.name.contains(".dpg") -or $item.name.contains(".tvs") -or $item.name.contains(".vep") -or $item.name.contains(".rcproject") -or $item.name.contains(".smil") -or $item.name.contains(".vf") -or $item.name.contains(".60d") -or $item.name.contains(".moff") -or $item.name.contains(".vid") -or $item.name.contains(".dvr-ms") -or $item.name.contains(".bmk") -or $item.name.contains(".edl") -or $item.name.contains(".snagproj") -or $item.name.contains(".amv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".dv") -or $item.name.contains(".dv-avi") -or $item.name.contains(".eye") -or $item.name.contains(".mjp") -or $item.name.contains(".mp21") -or $item.name.contains(".pgi") -or $item.name.contains(".rmd") -or $item.name.contains(".thp") -or $item.name.contains(".avs") -or $item.name.contains(".int") -or $item.name.contains(".mp2v") -or $item.name.contains(".scn") -or $item.name.contains(".tdt") -or $item.name.contains(".ismclip") -or $item.name.contains(".m4e") -or $item.name.contains(".mpl") -or $item.name.contains(".avs") -or $item.name.contains(".evo") -or $item.name.contains(".smi") -or $item.name.contains(".mpg2") -or $item.name.contains(".vivo") -or $item.name.contains(".movie") -or $item.name.contains(".3gpp2") -or $item.name.contains(".irf") -or $item.name.contains(".asx") -or $item.name.contains(".axm") -or $item.name.contains(".cmproj") -or $item.name.contains(".dmsd3d") -or $item.name.contains(".dvx") -or $item.name.contains(".ezt") -or $item.name.contains(".mqv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mvy") -or $item.name.contains(".prel") -or $item.name.contains(".vp7") -or $item.name.contains(".xel") -or $item.name.contains(".aet") -or $item.name.contains(".anx") -or $item.name.contains(".avc") -or $item.name.contains(".avd") -or $item.name.contains(".awlive") -or $item.name.contains(".axv") -or $item.name.contains(".bdt2") -or $item.name.contains(".bs4") -or $item.name.contains(".bvr") -or $item.name.contains(".byu") -or $item.name.contains(".camv") -or $item.name.contains(".clk") -or $item.name.contains(".cmv") -or $item.name.contains(".cx3") -or $item.name.contains(".ddat") -or $item.name.contains(".dlx") -or $item.name.contains(".dmb") -or $item.name.contains(".dmsm3d") -or $item.name.contains(".exo") -or $item.name.contains(".fbr") -or $item.name.contains(".fcarch") -or $item.name.contains(".ffd") -or $item.name.contains(".flx") -or $item.name.contains(".g64") -or $item.name.contains(".gvp") -or $item.name.contains(".imovielibrary") -or $item.name.contains(".iva"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".jmv") -or $item.name.contains(".ktn") -or $item.name.contains(".m1v") -or $item.name.contains(".m2a") -or $item.name.contains(".m4u") -or $item.name.contains(".mjpg") -or $item.name.contains(".mpsub") -or $item.name.contains(".mvex") -or $item.name.contains(".osp") -or $item.name.contains(".pns") -or $item.name.contains(".pro4dvd") -or $item.name.contains(".pro5dvd") -or $item.name.contains(".proqc") -or $item.name.contains(".pssd") -or $item.name.contains(".pva") -or $item.name.contains(".qtch") -or $item.name.contains(".qtindex") -or $item.name.contains(".qtm") -or $item.name.contains(".rp") -or $item.name.contains(".rts") -or $item.name.contains(".sbt") -or $item.name.contains(".sml") -or $item.name.contains(".theater") -or $item.name.contains(".tid") -or $item.name.contains(".tvrecording") -or $item.name.contains(".vem") -or $item.name.contains(".vfw") -or $item.name.contains(".vix") -or $item.name.contains(".vs4") -or $item.name.contains(".vse"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".wot") -or $item.name.contains(".yog") -or $item.name.contains(".mvb") -or $item.name.contains(".ssf") -or $item.name.contains(".wtv") -or $item.name.contains(".mpl") -or $item.name.contains(".xmv") -or $item.name.contains(".dif") -or $item.name.contains(".modd") -or $item.name.contains(".vft") -or $item.name.contains(".vmlt") -or $item.name.contains(".grasp") -or $item.name.contains(".moov") -or $item.name.contains(".pvr") -or $item.name.contains(".vmlf") -or $item.name.contains(".am") -or $item.name.contains(".anim") -or $item.name.contains(".bix") -or $item.name.contains(".cel") -or $item.name.contains(".cvc") -or $item.name.contains(".dsy") -or $item.name.contains(".gl") -or $item.name.contains(".ivs") -or $item.name.contains(".lsf") -or $item.name.contains(".m75") -or $item.name.contains(".mpeg1") -or $item.name.contains(".mpf") -or $item.name.contains(".msh") -or $item.name.contains(".nut") -or $item.name.contains(".pjs") -or $item.name.contains(".pmv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".psb") -or $item.name.contains(".rmd") -or $item.name.contains(".rts") -or $item.name.contains(".scm") -or $item.name.contains(".sec") -or $item.name.contains(".tdx") -or $item.name.contains(".vdx") -or $item.name.contains(".viv") -or $item.name.contains(".stx"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- }
- }
- }
- }
- }
-
- }
The preceding piece of code generates an output file (FarmWideVideoFiles.csv) with all the information captured and places it under the same location where the PowerShell script exists.
The output file has the following information:
Function 2
The following piece of code helps you to find all the video files uploaded under a specific web application:
- Function VideoFilesInWebApp()
- {
- $output = $scriptbase + "\" + "WebAppWideVideoFiles.csv"
- "WebAppURL" + "," + "SiteCollection" + "," + "WebURL" + "," + "ListName" + "," + "ItemID" + "," + "ItemName" | Out-File -Encoding Default -FilePath $Output;
- $webAppURL = read-host "Enter the web application URL"
- $webapp = get-spwebapplication $webappURL -ea silentlycontinue
- if($webapp -ne $null)
- {
- write-host "Capturing video files info under the web application $webAppURL" -fore magenta
- $sites = get-spsite -limit all -webapplication $webAppURL
- foreach($site in $sites)
- {
- write-host "Processing site collection " $site.url -fore Magenta
- foreach($web in $site.allwebs)
- {
- write-host "Processing site/web " $web.url -fore yellow
- foreach($list in $web.lists)
- {
- if($List.BaseType -eq "DocumentLibrary")
- {
- write-host "Processing list " $list.title " under site " $web.url -fore cyan
- foreach($item in $list.items)
- {
- if($item.name.contains(".aep") -or $item.name.contains(".sfd") -or $item.name.contains(".rms") -or $item.name.contains(".dzm") -or $item.name.contains(".fcp") -or $item.name.contains(".psh") -or $item.name.contains(".usm") -or $item.name.contains(".sbk") -or $item.name.contains(".wp3") -or $item.name.contains(".wpl") -or $item.name.contains(".dir") -or $item.name.contains(".wlmp") -or $item.name.contains(".piv") -or $item.name.contains(".mswmm") -or $item.name.contains(".veg") -or $item.name.contains(".3gp") -or $item.name.contains(".scm") -or $item.name.contains(".trp") -or $item.name.contains(".swf") -or $item.name.contains(".webm") -or $item.name.contains(".m4v") -or $item.name.contains(".mpeg") -or $item.name.contains(".bdmv") -or $item.name.contains(".dzt") -or $item.name.contains(".gfp") -or $item.name.contains(".m21") -or $item.name.contains(".mproj") -or $item.name.contains(".mvp") -or $item.name.contains(".nuv") -or $item.name.contains(".rdb") -or $item.name.contains(".rmp"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".rv") -or$item.name.contains(".screenflow") -or $item.name.contains(".swt") -or $item.name.contains(".vcpf") -or $item.name.contains(".viewlet") -or $item.name.contains(".dnc") -or $item.name.contains(".wm") -or $item.name.contains(".mkv") -or $item.name.contains(".srt") -or $item.name.contains(".avi") -or $item.name.contains(".vob") -or $item.name.contains(".prproj") -or $item.name.contains(".mani") -or $item.name.contains(".m2p") -or $item.name.contains(".meta") -or $item.name.contains(".rec") -or $item.name.contains(".msdvd") -or $item.name.contains(".tp") -or $item.name.contains(".wmv") -or $item.name.contains(".asf") -or $item.name.contains(".dzp") -or $item.name.contains(".bik") -or $item.name.contains(".bnp") -or $item.name.contains(".mp4.infovid") -or $item.name.contains(".gvi") -or $item.name.contains(".aepx") -or $item.name.contains(".vro") -or $item.name.contains(".amc") -or $item.name.contains(".bin") -or $item.name.contains(".mpg") -or $item.name.contains(".fbr"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mts") -or $item.name.contains(".nvc") -or $item.name.contains(".ifo") -or $item.name.contains(".swi") -or $item.name.contains(".ism") -or $item.name.contains(".amx") -or $item.name.contains(".ts") -or $item.name.contains(".vsp") -or $item.name.contains(".kmv") -or $item.name.contains(".dcr") -or $item.name.contains(".hdmov") -or $item.name.contains(".pds") -or $item.name.contains(".3gp2") -or $item.name.contains(".pac") -or $item.name.contains(".trec") -or $item.name.contains(".vc1") -or $item.name.contains(".wmx") -or $item.name.contains(".bu") -or $item.name.contains(".mmv") -or $item.name.contains(".vp3") -or $item.name.contains(".cpi") -or $item.name.contains(".mp4") -or $item.name.contains(".mob") -or $item.name.contains(".mov") -or $item.name.contains(".bdm") -or $item.name.contains(".scc") -or $item.name.contains(".dcr") -or $item.name.contains(".3g2") -or $item.name.contains(".f4v") -or $item.name.contains(".flv") -or $item.name.contains(".r3d"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".xvid") -or $item.name.contains(".avchd") -or $item.name.contains(".dmx") -or $item.name.contains(".m1pg") -or $item.name.contains(".mnv") -or $item.name.contains(".roq") -or $item.name.contains(".ttxt") -or $item.name.contains(".wve") -or $item.name.contains(".f4f") -or $item.name.contains(".ivf") -or $item.name.contains(".k3g") -or $item.name.contains(".lsx") -or $item.name.contains(".lvix") -or $item.name.contains(".mvc") -or $item.name.contains(".playlist") -or $item.name.contains(".qt") -or $item.name.contains(".spl") -or $item.name.contains(".vcr") -or $item.name.contains(".w32") -or $item.name.contains(".dat") -or $item.name.contains(".vp6") -or $item.name.contains(".vpj") -or $item.name.contains(".3mm") -or $item.name.contains(".str") -or $item.name.contains(".vgz") -or $item.name.contains(".dav") -or $item.name.contains(".smv") -or $item.name.contains(".camproj") -or $item.name.contains(".divx") -or $item.name.contains(".dvdmedia") -or $item.name.contains(".fcproject"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".ismv") -or $item.name.contains(".otrkey") -or $item.name.contains(".sqz") -or $item.name.contains(".tix") -or $item.name.contains(".yuv") -or $item.name.contains(".clpi") -or $item.name.contains(".dvr") -or $item.name.contains(".f4p") -or $item.name.contains(".fli") -or $item.name.contains(".hdv") -or $item.name.contains(".rsx") -or $item.name.contains(".inp") -or $item.name.contains(".m15") -or $item.name.contains(".mpeg4") -or $item.name.contains(".rmvb") -or $item.name.contains(".video") -or $item.name.contains(".ogv") -or $item.name.contains(".lrv") -or $item.name.contains(".dxr") -or $item.name.contains(".mvp") -or $item.name.contains(".wmd") -or $item.name.contains(".dv4") -or $item.name.contains(".h264") -or $item.name.contains(".aetx") -or $item.name.contains(".db2") -or $item.name.contains(".mod") -or $item.name.contains(".sfera") -or $item.name.contains(".ajp") -or $item.name.contains(".rm") -or $item.name.contains(".mxf") -or $item.name.contains(".3gpp"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".m2t") -or $item.name.contains(".pmf") -or $item.name.contains(".dash") -or $item.name.contains(".ale") -or $item.name.contains(".avp") -or $item.name.contains(".bsf") -or $item.name.contains(".dmsm") -or $item.name.contains(".dream") -or $item.name.contains(".imovieproj") -or $item.name.contains(".moi") -or $item.name.contains(".3p2") -or $item.name.contains(".aaf") -or $item.name.contains(".arcut") -or $item.name.contains(".avb") -or $item.name.contains(".avv") -or $item.name.contains(".bdt3") -or $item.name.contains(".bmc") -or $item.name.contains(".ced") -or $item.name.contains(".cine") -or $item.name.contains(".cip") -or $item.name.contains(".cmmp") -or $item.name.contains(".cmmtpl") -or $item.name.contains(".cmrec") -or $item.name.contains(".cst") -or $item.name.contains(".d2v") -or $item.name.contains(".d3v") -or $item.name.contains(".dce") -or $item.name.contains(".dck") -or $item.name.contains(".dmsd") -or $item.name.contains(".dmss") -or $item.name.contains(".dpa"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".evo") -or $item.name.contains(".eyetv") -or $item.name.contains(".fbz") -or $item.name.contains(".ffm") -or $item.name.contains(".flc") -or $item.name.contains(".flh") -or $item.name.contains(".fpdx") -or $item.name.contains(".ftc") -or $item.name.contains(".gcs") -or $item.name.contains(".gifv") -or $item.name.contains(".gts") -or $item.name.contains(".hkm") -or $item.name.contains(".imoviemobile") -or $item.name.contains(".imovieproject") -or $item.name.contains(".ircp") -or $item.name.contains(".ismc") -or $item.name.contains(".ivr") -or $item.name.contains(".izz") -or $item.name.contains(".izzy") -or $item.name.contains(".jss") -or $item.name.contains(".jts") -or $item.name.contains(".jtv") -or $item.name.contains(".kdenlive") -or $item.name.contains(".m21") -or $item.name.contains(".m2ts") -or $item.name.contains(".m2v") -or $item.name.contains(".mgv") -or $item.name.contains(".mj2") -or $item.name.contains(".mk3d") -or $item.name.contains(".mp21"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mpgindex") -or $item.name.contains(".mpls") -or $item.name.contains(".mpv") -or $item.name.contains(".mse") -or $item.name.contains(".mtv") -or $item.name.contains(".mvd") -or $item.name.contains(".mve") -or $item.name.contains(".mxv") -or $item.name.contains(".ncor") -or $item.name.contains(".nsv") -or $item.name.contains(".ogm") -or $item.name.contains(".ogx") -or $item.name.contains(".photoshow") -or $item.name.contains(".plproj") -or $item.name.contains(".ppj") -or $item.name.contains(".pro") -or $item.name.contains(".prtl") -or $item.name.contains(".pxv") -or $item.name.contains(".qtl") -or $item.name.contains(".qtz") -or $item.name.contains(".rcd") -or $item.name.contains(".rum") -or $item.name.contains(".rvid") -or $item.name.contains(".rvl") -or $item.name.contains(".sdv") -or $item.name.contains(".sedprj") -or $item.name.contains(".seq") -or $item.name.contains(".sfvidcap") -or $item.name.contains(".siv") -or $item.name.contains(".smi"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".smk") -or $item.name.contains(".stl") -or $item.name.contains(".svi") -or $item.name.contains(".tda3mt") -or $item.name.contains(".tivo") -or $item.name.contains(".tod") -or $item.name.contains(".tp0") -or $item.name.contains(".tpd") -or $item.name.contains(".tpr") -or $item.name.contains(".tsp") -or $item.name.contains(".tvlayer") -or $item.name.contains(".tvshow") -or $item.name.contains(".usf") -or $item.name.contains(".vbc") -or $item.name.contains(".vcv") -or $item.name.contains(".vdo") -or $item.name.contains(".vdr") -or $item.name.contains(".vfz") -or $item.name.contains(".vlab") -or $item.name.contains(".wcp") -or $item.name.contains(".wmmp") -or $item.name.contains(".wvx") -or $item.name.contains(".xej") -or $item.name.contains(".xesc") -or $item.name.contains(".xfl") -or $item.name.contains(".xlmv") -or $item.name.contains(".y4m") -or $item.name.contains(".zm1") -or $item.name.contains(".zm2") -or $item.name.contains(".zm3") -or $item.name.contains(".lrec"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mp4v") -or $item.name.contains(".mpe") -or $item.name.contains(".mys") -or $item.name.contains(".par") -or $item.name.contains(".aqt") -or $item.name.contains(".gom") -or $item.name.contains(".mpv2") -or $item.name.contains(".orv") -or $item.name.contains(".rmv") -or $item.name.contains(".ssm") -or $item.name.contains(".zeg") -or $item.name.contains(".camrec") -or $item.name.contains(".zmv") -or $item.name.contains(".aec") -or $item.name.contains(".box") -or $item.name.contains(".arf") -or $item.name.contains(".dpg") -or $item.name.contains(".tvs") -or $item.name.contains(".vep") -or $item.name.contains(".rcproject") -or $item.name.contains(".smil") -or $item.name.contains(".vf") -or $item.name.contains(".60d") -or $item.name.contains(".moff") -or $item.name.contains(".vid") -or $item.name.contains(".dvr-ms") -or $item.name.contains(".bmk") -or $item.name.contains(".edl") -or $item.name.contains(".snagproj") -or $item.name.contains(".amv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".dv") -or $item.name.contains(".dv-avi") -or $item.name.contains(".eye") -or $item.name.contains(".mjp") -or $item.name.contains(".mp21") -or $item.name.contains(".pgi") -or $item.name.contains(".rmd") -or $item.name.contains(".thp") -or $item.name.contains(".avs") -or $item.name.contains(".int") -or $item.name.contains(".mp2v") -or $item.name.contains(".scn") -or $item.name.contains(".tdt") -or $item.name.contains(".ismclip") -or $item.name.contains(".m4e") -or $item.name.contains(".mpl") -or $item.name.contains(".avs") -or $item.name.contains(".evo") -or $item.name.contains(".smi") -or $item.name.contains(".mpg2") -or $item.name.contains(".vivo") -or $item.name.contains(".movie") -or $item.name.contains(".3gpp2") -or $item.name.contains(".irf") -or $item.name.contains(".asx") -or $item.name.contains(".axm") -or $item.name.contains(".cmproj") -or $item.name.contains(".dmsd3d") -or $item.name.contains(".dvx") -or $item.name.contains(".ezt") -or $item.name.contains(".mqv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mvy") -or $item.name.contains(".prel") -or $item.name.contains(".vp7") -or $item.name.contains(".xel") -or $item.name.contains(".aet") -or $item.name.contains(".anx") -or $item.name.contains(".avc") -or $item.name.contains(".avd") -or $item.name.contains(".awlive") -or $item.name.contains(".axv") -or $item.name.contains(".bdt2") -or $item.name.contains(".bs4") -or $item.name.contains(".bvr") -or $item.name.contains(".byu") -or $item.name.contains(".camv") -or $item.name.contains(".clk") -or $item.name.contains(".cmv") -or $item.name.contains(".cx3") -or $item.name.contains(".ddat") -or $item.name.contains(".dlx") -or $item.name.contains(".dmb") -or $item.name.contains(".dmsm3d") -or $item.name.contains(".exo") -or $item.name.contains(".fbr") -or $item.name.contains(".fcarch") -or $item.name.contains(".ffd") -or $item.name.contains(".flx") -or $item.name.contains(".g64") -or $item.name.contains(".gvp") -or $item.name.contains(".imovielibrary") -or $item.name.contains(".iva"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".jmv") -or $item.name.contains(".ktn") -or $item.name.contains(".m1v") -or $item.name.contains(".m2a") -or $item.name.contains(".m4u") -or $item.name.contains(".mjpg") -or $item.name.contains(".mpsub") -or $item.name.contains(".mvex") -or $item.name.contains(".osp") -or $item.name.contains(".pns") -or $item.name.contains(".pro4dvd") -or $item.name.contains(".pro5dvd") -or $item.name.contains(".proqc") -or $item.name.contains(".pssd") -or $item.name.contains(".pva") -or $item.name.contains(".qtch") -or $item.name.contains(".qtindex") -or $item.name.contains(".qtm") -or $item.name.contains(".rp") -or $item.name.contains(".rts") -or $item.name.contains(".sbt") -or $item.name.contains(".sml") -or $item.name.contains(".theater") -or $item.name.contains(".tid") -or $item.name.contains(".tvrecording") -or $item.name.contains(".vem") -or $item.name.contains(".vfw") -or $item.name.contains(".vix") -or $item.name.contains(".vs4") -or $item.name.contains(".vse"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".wot") -or $item.name.contains(".yog") -or $item.name.contains(".mvb") -or $item.name.contains(".ssf") -or $item.name.contains(".wtv") -or $item.name.contains(".mpl") -or $item.name.contains(".xmv") -or $item.name.contains(".dif") -or $item.name.contains(".modd") -or $item.name.contains(".vft") -or $item.name.contains(".vmlt") -or $item.name.contains(".grasp") -or $item.name.contains(".moov") -or $item.name.contains(".pvr") -or $item.name.contains(".vmlf") -or $item.name.contains(".am") -or $item.name.contains(".anim") -or $item.name.contains(".bix") -or $item.name.contains(".cel") -or $item.name.contains(".cvc") -or $item.name.contains(".dsy") -or $item.name.contains(".gl") -or $item.name.contains(".ivs") -or $item.name.contains(".lsf") -or $item.name.contains(".m75") -or $item.name.contains(".mpeg1") -or $item.name.contains(".mpf") -or $item.name.contains(".msh") -or $item.name.contains(".nut") -or $item.name.contains(".pjs") -or $item.name.contains(".pmv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".psb") -or $item.name.contains(".rmd") -or $item.name.contains(".rts") -or $item.name.contains(".scm") -or $item.name.contains(".sec") -or $item.name.contains(".tdx") -or $item.name.contains(".vdx") -or $item.name.contains(".viv") -or $item.name.contains(".stx"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $webAppURL + "," + $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- }
- }
- }
- }
- }
- }
- else
- {
- write-host "Invalid web application.... please check the URL " $webappURL -fore red
- }
- }
The preceding piece of code generates an output file (WebAppWideVideoFiles.csv) with all the information captured and places it under the same location where the PowerShell script exists.
The output file has the following information:
Function 3
The following piece of code helps you to find all the video files uploaded under a specific site collection:
- Function VideoFilesInSpecificSiteCollection()
- {
- $output = $scriptbase + "\" + "SiteCollectionVideoFiles.csv"
- "SiteCollection" + "," + "WebURL" + "," + "ListName" + "," + "ItemID" + "," + "ItemName" | Out-File -Encoding Default -FilePath $Output;
- $SiteCollectionURL = read-host "Enter the site collection URL"
- $Site = get-spsite $SiteCollectionURL -ea silentlycontinue
- if($Site -ne $null)
- {
- write-host "Capturing video files info under the site collection $SiteCollectionURL" -fore magenta
- write-host "Processing site collection " $site.url -fore Magenta
- foreach($web in $site.allwebs)
- {
- write-host "Processing site/web " $web.url -fore yellow
- foreach($list in $web.lists)
- {
- if($List.BaseType -eq "DocumentLibrary")
- {
- write-host "Processing list " $list.title " under site " $web.url -fore cyan
- foreach($item in $list.items)
- {
- if($item.name.contains(".aep") -or $item.name.contains(".sfd") -or $item.name.contains(".rms") -or $item.name.contains(".dzm") -or $item.name.contains(".fcp") -or $item.name.contains(".psh") -or $item.name.contains(".usm") -or $item.name.contains(".sbk") -or $item.name.contains(".wp3") -or $item.name.contains(".wpl") -or $item.name.contains(".dir") -or $item.name.contains(".wlmp") -or $item.name.contains(".piv") -or $item.name.contains(".mswmm") -or $item.name.contains(".veg") -or $item.name.contains(".3gp") -or $item.name.contains(".scm") -or $item.name.contains(".trp") -or $item.name.contains(".swf") -or $item.name.contains(".webm") -or $item.name.contains(".m4v") -or $item.name.contains(".mpeg") -or $item.name.contains(".bdmv") -or $item.name.contains(".dzt") -or $item.name.contains(".gfp") -or $item.name.contains(".m21") -or $item.name.contains(".mproj") -or $item.name.contains(".mvp") -or $item.name.contains(".nuv") -or $item.name.contains(".rdb") -or $item.name.contains(".rmp"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".rv") -or$item.name.contains(".screenflow") -or $item.name.contains(".swt") -or $item.name.contains(".vcpf") -or $item.name.contains(".viewlet") -or $item.name.contains(".dnc") -or $item.name.contains(".wm") -or $item.name.contains(".mkv") -or $item.name.contains(".srt") -or $item.name.contains(".avi") -or $item.name.contains(".vob") -or $item.name.contains(".prproj") -or $item.name.contains(".mani") -or $item.name.contains(".m2p") -or $item.name.contains(".meta") -or $item.name.contains(".rec") -or $item.name.contains(".msdvd") -or $item.name.contains(".tp") -or $item.name.contains(".wmv") -or $item.name.contains(".asf") -or $item.name.contains(".dzp") -or $item.name.contains(".bik") -or $item.name.contains(".bnp") -or $item.name.contains(".mp4.infovid") -or $item.name.contains(".gvi") -or $item.name.contains(".aepx") -or $item.name.contains(".vro") -or $item.name.contains(".amc") -or $item.name.contains(".bin") -or $item.name.contains(".mpg") -or $item.name.contains(".fbr"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mts") -or $item.name.contains(".nvc") -or $item.name.contains(".ifo") -or $item.name.contains(".swi") -or $item.name.contains(".ism") -or $item.name.contains(".amx") -or $item.name.contains(".ts") -or $item.name.contains(".vsp") -or $item.name.contains(".kmv") -or $item.name.contains(".dcr") -or $item.name.contains(".hdmov") -or $item.name.contains(".pds") -or $item.name.contains(".3gp2") -or $item.name.contains(".pac") -or $item.name.contains(".trec") -or $item.name.contains(".vc1") -or $item.name.contains(".wmx") -or $item.name.contains(".bu") -or $item.name.contains(".mmv") -or $item.name.contains(".vp3") -or $item.name.contains(".cpi") -or $item.name.contains(".mp4") -or $item.name.contains(".mob") -or $item.name.contains(".mov") -or $item.name.contains(".bdm") -or $item.name.contains(".scc") -or $item.name.contains(".dcr") -or $item.name.contains(".3g2") -or $item.name.contains(".f4v") -or $item.name.contains(".flv") -or $item.name.contains(".r3d"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".xvid") -or $item.name.contains(".avchd") -or $item.name.contains(".dmx") -or $item.name.contains(".m1pg") -or $item.name.contains(".mnv") -or $item.name.contains(".roq") -or $item.name.contains(".ttxt") -or $item.name.contains(".wve") -or $item.name.contains(".f4f") -or $item.name.contains(".ivf") -or $item.name.contains(".k3g") -or $item.name.contains(".lsx") -or $item.name.contains(".lvix") -or $item.name.contains(".mvc") -or $item.name.contains(".playlist") -or $item.name.contains(".qt") -or $item.name.contains(".spl") -or $item.name.contains(".vcr") -or $item.name.contains(".w32") -or $item.name.contains(".dat") -or $item.name.contains(".vp6") -or $item.name.contains(".vpj") -or $item.name.contains(".3mm") -or $item.name.contains(".str") -or $item.name.contains(".vgz") -or $item.name.contains(".dav") -or $item.name.contains(".smv") -or $item.name.contains(".camproj") -or $item.name.contains(".divx") -or $item.name.contains(".dvdmedia") -or $item.name.contains(".fcproject"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".ismv") -or $item.name.contains(".otrkey") -or $item.name.contains(".sqz") -or $item.name.contains(".tix") -or $item.name.contains(".yuv") -or $item.name.contains(".clpi") -or $item.name.contains(".dvr") -or $item.name.contains(".f4p") -or $item.name.contains(".fli") -or $item.name.contains(".hdv") -or $item.name.contains(".rsx") -or $item.name.contains(".inp") -or $item.name.contains(".m15") -or $item.name.contains(".mpeg4") -or $item.name.contains(".rmvb") -or $item.name.contains(".video") -or $item.name.contains(".ogv") -or $item.name.contains(".lrv") -or $item.name.contains(".dxr") -or $item.name.contains(".mvp") -or $item.name.contains(".wmd") -or $item.name.contains(".dv4") -or $item.name.contains(".h264") -or $item.name.contains(".aetx") -or $item.name.contains(".db2") -or $item.name.contains(".mod") -or $item.name.contains(".sfera") -or $item.name.contains(".ajp") -or $item.name.contains(".rm") -or $item.name.contains(".mxf") -or $item.name.contains(".3gpp"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".m2t") -or $item.name.contains(".pmf") -or $item.name.contains(".dash") -or $item.name.contains(".ale") -or $item.name.contains(".avp") -or $item.name.contains(".bsf") -or $item.name.contains(".dmsm") -or $item.name.contains(".dream") -or $item.name.contains(".imovieproj") -or $item.name.contains(".moi") -or $item.name.contains(".3p2") -or $item.name.contains(".aaf") -or $item.name.contains(".arcut") -or $item.name.contains(".avb") -or $item.name.contains(".avv") -or $item.name.contains(".bdt3") -or $item.name.contains(".bmc") -or $item.name.contains(".ced") -or $item.name.contains(".cine") -or $item.name.contains(".cip") -or $item.name.contains(".cmmp") -or $item.name.contains(".cmmtpl") -or $item.name.contains(".cmrec") -or $item.name.contains(".cst") -or $item.name.contains(".d2v") -or $item.name.contains(".d3v") -or $item.name.contains(".dce") -or $item.name.contains(".dck") -or $item.name.contains(".dmsd") -or $item.name.contains(".dmss") -or $item.name.contains(".dpa"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".evo") -or $item.name.contains(".eyetv") -or $item.name.contains(".fbz") -or $item.name.contains(".ffm") -or $item.name.contains(".flc") -or $item.name.contains(".flh") -or $item.name.contains(".fpdx") -or $item.name.contains(".ftc") -or $item.name.contains(".gcs") -or $item.name.contains(".gifv") -or $item.name.contains(".gts") -or $item.name.contains(".hkm") -or $item.name.contains(".imoviemobile") -or $item.name.contains(".imovieproject") -or $item.name.contains(".ircp") -or $item.name.contains(".ismc") -or $item.name.contains(".ivr") -or $item.name.contains(".izz") -or $item.name.contains(".izzy") -or $item.name.contains(".jss") -or $item.name.contains(".jts") -or $item.name.contains(".jtv") -or $item.name.contains(".kdenlive") -or $item.name.contains(".m21") -or $item.name.contains(".m2ts") -or $item.name.contains(".m2v") -or $item.name.contains(".mgv") -or $item.name.contains(".mj2") -or $item.name.contains(".mk3d") -or $item.name.contains(".mp21"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mpgindex") -or $item.name.contains(".mpls") -or $item.name.contains(".mpv") -or $item.name.contains(".mse") -or $item.name.contains(".mtv") -or $item.name.contains(".mvd") -or $item.name.contains(".mve") -or $item.name.contains(".mxv") -or $item.name.contains(".ncor") -or $item.name.contains(".nsv") -or $item.name.contains(".ogm") -or $item.name.contains(".ogx") -or $item.name.contains(".photoshow") -or $item.name.contains(".plproj") -or $item.name.contains(".ppj") -or $item.name.contains(".pro") -or $item.name.contains(".prtl") -or $item.name.contains(".pxv") -or $item.name.contains(".qtl") -or $item.name.contains(".qtz") -or $item.name.contains(".rcd") -or $item.name.contains(".rum") -or $item.name.contains(".rvid") -or $item.name.contains(".rvl") -or $item.name.contains(".sdv") -or $item.name.contains(".sedprj") -or $item.name.contains(".seq") -or $item.name.contains(".sfvidcap") -or $item.name.contains(".siv") -or $item.name.contains(".smi"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".smk") -or $item.name.contains(".stl") -or $item.name.contains(".svi") -or $item.name.contains(".tda3mt") -or $item.name.contains(".tivo") -or $item.name.contains(".tod") -or $item.name.contains(".tp0") -or $item.name.contains(".tpd") -or $item.name.contains(".tpr") -or $item.name.contains(".tsp") -or $item.name.contains(".tvlayer") -or $item.name.contains(".tvshow") -or $item.name.contains(".usf") -or $item.name.contains(".vbc") -or $item.name.contains(".vcv") -or $item.name.contains(".vdo") -or $item.name.contains(".vdr") -or $item.name.contains(".vfz") -or $item.name.contains(".vlab") -or $item.name.contains(".wcp") -or $item.name.contains(".wmmp") -or $item.name.contains(".wvx") -or $item.name.contains(".xej") -or $item.name.contains(".xesc") -or $item.name.contains(".xfl") -or $item.name.contains(".xlmv") -or $item.name.contains(".y4m") -or $item.name.contains(".zm1") -or $item.name.contains(".zm2") -or $item.name.contains(".zm3") -or $item.name.contains(".lrec"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mp4v") -or $item.name.contains(".mpe") -or $item.name.contains(".mys") -or $item.name.contains(".par") -or $item.name.contains(".aqt") -or $item.name.contains(".gom") -or $item.name.contains(".mpv2") -or $item.name.contains(".orv") -or $item.name.contains(".rmv") -or $item.name.contains(".ssm") -or $item.name.contains(".zeg") -or $item.name.contains(".camrec") -or $item.name.contains(".zmv") -or $item.name.contains(".aec") -or $item.name.contains(".box") -or $item.name.contains(".arf") -or $item.name.contains(".dpg") -or $item.name.contains(".tvs") -or $item.name.contains(".vep") -or $item.name.contains(".rcproject") -or $item.name.contains(".smil") -or $item.name.contains(".vf") -or $item.name.contains(".60d") -or $item.name.contains(".moff") -or $item.name.contains(".vid") -or $item.name.contains(".dvr-ms") -or $item.name.contains(".bmk") -or $item.name.contains(".edl") -or $item.name.contains(".snagproj") -or $item.name.contains(".amv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".dv") -or $item.name.contains(".dv-avi") -or $item.name.contains(".eye") -or $item.name.contains(".mjp") -or $item.name.contains(".mp21") -or $item.name.contains(".pgi") -or $item.name.contains(".rmd") -or $item.name.contains(".thp") -or $item.name.contains(".avs") -or $item.name.contains(".int") -or $item.name.contains(".mp2v") -or $item.name.contains(".scn") -or $item.name.contains(".tdt") -or $item.name.contains(".ismclip") -or $item.name.contains(".m4e") -or $item.name.contains(".mpl") -or $item.name.contains(".avs") -or $item.name.contains(".evo") -or $item.name.contains(".smi") -or $item.name.contains(".mpg2") -or $item.name.contains(".vivo") -or $item.name.contains(".movie") -or $item.name.contains(".3gpp2") -or $item.name.contains(".irf") -or $item.name.contains(".asx") -or $item.name.contains(".axm") -or $item.name.contains(".cmproj") -or $item.name.contains(".dmsd3d") -or $item.name.contains(".dvx") -or $item.name.contains(".ezt") -or $item.name.contains(".mqv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mvy") -or $item.name.contains(".prel") -or $item.name.contains(".vp7") -or $item.name.contains(".xel") -or $item.name.contains(".aet") -or $item.name.contains(".anx") -or $item.name.contains(".avc") -or $item.name.contains(".avd") -or $item.name.contains(".awlive") -or $item.name.contains(".axv") -or $item.name.contains(".bdt2") -or $item.name.contains(".bs4") -or $item.name.contains(".bvr") -or $item.name.contains(".byu") -or $item.name.contains(".camv") -or $item.name.contains(".clk") -or $item.name.contains(".cmv") -or $item.name.contains(".cx3") -or $item.name.contains(".ddat") -or $item.name.contains(".dlx") -or $item.name.contains(".dmb") -or $item.name.contains(".dmsm3d") -or $item.name.contains(".exo") -or $item.name.contains(".fbr") -or $item.name.contains(".fcarch") -or $item.name.contains(".ffd") -or $item.name.contains(".flx") -or $item.name.contains(".g64") -or $item.name.contains(".gvp") -or $item.name.contains(".imovielibrary") -or $item.name.contains(".iva"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".jmv") -or $item.name.contains(".ktn") -or $item.name.contains(".m1v") -or $item.name.contains(".m2a") -or $item.name.contains(".m4u") -or $item.name.contains(".mjpg") -or $item.name.contains(".mpsub") -or $item.name.contains(".mvex") -or $item.name.contains(".osp") -or $item.name.contains(".pns") -or $item.name.contains(".pro4dvd") -or $item.name.contains(".pro5dvd") -or $item.name.contains(".proqc") -or $item.name.contains(".pssd") -or $item.name.contains(".pva") -or $item.name.contains(".qtch") -or $item.name.contains(".qtindex") -or $item.name.contains(".qtm") -or $item.name.contains(".rp") -or $item.name.contains(".rts") -or $item.name.contains(".sbt") -or $item.name.contains(".sml") -or $item.name.contains(".theater") -or $item.name.contains(".tid") -or $item.name.contains(".tvrecording") -or $item.name.contains(".vem") -or $item.name.contains(".vfw") -or $item.name.contains(".vix") -or $item.name.contains(".vs4") -or $item.name.contains(".vse"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".wot") -or $item.name.contains(".yog") -or $item.name.contains(".mvb") -or $item.name.contains(".ssf") -or $item.name.contains(".wtv") -or $item.name.contains(".mpl") -or $item.name.contains(".xmv") -or $item.name.contains(".dif") -or $item.name.contains(".modd") -or $item.name.contains(".vft") -or $item.name.contains(".vmlt") -or $item.name.contains(".grasp") -or $item.name.contains(".moov") -or $item.name.contains(".pvr") -or $item.name.contains(".vmlf") -or $item.name.contains(".am") -or $item.name.contains(".anim") -or $item.name.contains(".bix") -or $item.name.contains(".cel") -or $item.name.contains(".cvc") -or $item.name.contains(".dsy") -or $item.name.contains(".gl") -or $item.name.contains(".ivs") -or $item.name.contains(".lsf") -or $item.name.contains(".m75") -or $item.name.contains(".mpeg1") -or $item.name.contains(".mpf") -or $item.name.contains(".msh") -or $item.name.contains(".nut") -or $item.name.contains(".pjs") -or $item.name.contains(".pmv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".psb") -or $item.name.contains(".rmd") -or $item.name.contains(".rts") -or $item.name.contains(".scm") -or $item.name.contains(".sec") -or $item.name.contains(".tdx") -or $item.name.contains(".vdx") -or $item.name.contains(".viv") -or $item.name.contains(".stx"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $site.url + "," + $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- }
- }
- }
- }
-
- }
- else
- {
- write-host "Invalid Site collection.... please check the URL " $SiteCollectionURL -fore red
- }
-
- }
The preceding piece of code generates an output file (SiteCollectionVideoFiles.csv) with all the information captured and places it under the same location where the PowerShell script exists.
The output file has the following information:
Function 4
The following piece of code helps you to find all the video files uploaded under a specific site or web:
- Function VideoFilesInSpecificSiteOrWeb()
- {
- $output = $scriptbase + "\" + "SiteOrWebVideoFiles.csv"
- "WebURL" + "," + "ListName" + "," + "ItemID" + "," + "ItemName" | Out-File -Encoding Default -FilePath $Output;
- $SiteOrWebURL = read-host "Enter the site or web URL"
- $web = get-spweb $SiteOrWebURL -ea silentlycontinue
- if($web -ne $null)
- {
- write-host "Capturing video files info under the site $siteorwebURL" -fore magenta
- write-host "Processing site/web " $web.url -fore yellow
- foreach($list in $web.lists)
- {
- if($List.BaseType -eq "DocumentLibrary")
- {
- write-host "Processing list " $list.title " under site " $web.url -fore cyan
- foreach($item in $list.items)
- {
- if($item.name.contains(".aep") -or $item.name.contains(".sfd") -or $item.name.contains(".rms") -or $item.name.contains(".dzm") -or $item.name.contains(".fcp") -or $item.name.contains(".psh") -or $item.name.contains(".usm") -or $item.name.contains(".sbk") -or $item.name.contains(".wp3") -or $item.name.contains(".wpl") -or $item.name.contains(".dir") -or $item.name.contains(".wlmp") -or $item.name.contains(".piv") -or $item.name.contains(".mswmm") -or $item.name.contains(".veg") -or $item.name.contains(".3gp") -or $item.name.contains(".scm") -or $item.name.contains(".trp") -or $item.name.contains(".swf") -or $item.name.contains(".webm") -or $item.name.contains(".m4v") -or $item.name.contains(".mpeg") -or $item.name.contains(".bdmv") -or $item.name.contains(".dzt") -or $item.name.contains(".gfp") -or $item.name.contains(".m21") -or $item.name.contains(".mproj") -or $item.name.contains(".mvp") -or $item.name.contains(".nuv") -or $item.name.contains(".rdb") -or $item.name.contains(".rmp"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".rv") -or$item.name.contains(".screenflow") -or $item.name.contains(".swt") -or $item.name.contains(".vcpf") -or $item.name.contains(".viewlet") -or $item.name.contains(".dnc") -or $item.name.contains(".wm") -or $item.name.contains(".mkv") -or $item.name.contains(".srt") -or $item.name.contains(".avi") -or $item.name.contains(".vob") -or $item.name.contains(".prproj") -or $item.name.contains(".mani") -or $item.name.contains(".m2p") -or $item.name.contains(".meta") -or $item.name.contains(".rec") -or $item.name.contains(".msdvd") -or $item.name.contains(".tp") -or $item.name.contains(".wmv") -or $item.name.contains(".asf") -or $item.name.contains(".dzp") -or $item.name.contains(".bik") -or $item.name.contains(".bnp") -or $item.name.contains(".mp4.infovid") -or $item.name.contains(".gvi") -or $item.name.contains(".aepx") -or $item.name.contains(".vro") -or $item.name.contains(".amc") -or $item.name.contains(".bin") -or $item.name.contains(".mpg") -or $item.name.contains(".fbr"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mts") -or $item.name.contains(".nvc") -or $item.name.contains(".ifo") -or $item.name.contains(".swi") -or $item.name.contains(".ism") -or $item.name.contains(".amx") -or $item.name.contains(".ts") -or $item.name.contains(".vsp") -or $item.name.contains(".kmv") -or $item.name.contains(".dcr") -or $item.name.contains(".hdmov") -or $item.name.contains(".pds") -or $item.name.contains(".3gp2") -or $item.name.contains(".pac") -or $item.name.contains(".trec") -or $item.name.contains(".vc1") -or $item.name.contains(".wmx") -or $item.name.contains(".bu") -or $item.name.contains(".mmv") -or $item.name.contains(".vp3") -or $item.name.contains(".cpi") -or $item.name.contains(".mp4") -or $item.name.contains(".mob") -or $item.name.contains(".mov") -or $item.name.contains(".bdm") -or $item.name.contains(".scc") -or $item.name.contains(".dcr") -or $item.name.contains(".3g2") -or $item.name.contains(".f4v") -or $item.name.contains(".flv") -or $item.name.contains(".r3d"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".xvid") -or $item.name.contains(".avchd") -or $item.name.contains(".dmx") -or $item.name.contains(".m1pg") -or $item.name.contains(".mnv") -or $item.name.contains(".roq") -or $item.name.contains(".ttxt") -or $item.name.contains(".wve") -or $item.name.contains(".f4f") -or $item.name.contains(".ivf") -or $item.name.contains(".k3g") -or $item.name.contains(".lsx") -or $item.name.contains(".lvix") -or $item.name.contains(".mvc") -or $item.name.contains(".playlist") -or $item.name.contains(".qt") -or $item.name.contains(".spl") -or $item.name.contains(".vcr") -or $item.name.contains(".w32") -or $item.name.contains(".dat") -or $item.name.contains(".vp6") -or $item.name.contains(".vpj") -or $item.name.contains(".3mm") -or $item.name.contains(".str") -or $item.name.contains(".vgz") -or $item.name.contains(".dav") -or $item.name.contains(".smv") -or $item.name.contains(".camproj") -or $item.name.contains(".divx") -or $item.name.contains(".dvdmedia") -or $item.name.contains(".fcproject"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".ismv") -or $item.name.contains(".otrkey") -or $item.name.contains(".sqz") -or $item.name.contains(".tix") -or $item.name.contains(".yuv") -or $item.name.contains(".clpi") -or $item.name.contains(".dvr") -or $item.name.contains(".f4p") -or $item.name.contains(".fli") -or $item.name.contains(".hdv") -or $item.name.contains(".rsx") -or $item.name.contains(".inp") -or $item.name.contains(".m15") -or $item.name.contains(".mpeg4") -or $item.name.contains(".rmvb") -or $item.name.contains(".video") -or $item.name.contains(".ogv") -or $item.name.contains(".lrv") -or $item.name.contains(".dxr") -or $item.name.contains(".mvp") -or $item.name.contains(".wmd") -or $item.name.contains(".dv4") -or $item.name.contains(".h264") -or $item.name.contains(".aetx") -or $item.name.contains(".db2") -or $item.name.contains(".mod") -or $item.name.contains(".sfera") -or $item.name.contains(".ajp") -or $item.name.contains(".rm") -or $item.name.contains(".mxf") -or $item.name.contains(".3gpp"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".m2t") -or $item.name.contains(".pmf") -or $item.name.contains(".dash") -or $item.name.contains(".ale") -or $item.name.contains(".avp") -or $item.name.contains(".bsf") -or $item.name.contains(".dmsm") -or $item.name.contains(".dream") -or $item.name.contains(".imovieproj") -or $item.name.contains(".moi") -or $item.name.contains(".3p2") -or $item.name.contains(".aaf") -or $item.name.contains(".arcut") -or $item.name.contains(".avb") -or $item.name.contains(".avv") -or $item.name.contains(".bdt3") -or $item.name.contains(".bmc") -or $item.name.contains(".ced") -or $item.name.contains(".cine") -or $item.name.contains(".cip") -or $item.name.contains(".cmmp") -or $item.name.contains(".cmmtpl") -or $item.name.contains(".cmrec") -or $item.name.contains(".cst") -or $item.name.contains(".d2v") -or $item.name.contains(".d3v") -or $item.name.contains(".dce") -or $item.name.contains(".dck") -or $item.name.contains(".dmsd") -or $item.name.contains(".dmss") -or $item.name.contains(".dpa"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".evo") -or $item.name.contains(".eyetv") -or $item.name.contains(".fbz") -or $item.name.contains(".ffm") -or $item.name.contains(".flc") -or $item.name.contains(".flh") -or $item.name.contains(".fpdx") -or $item.name.contains(".ftc") -or $item.name.contains(".gcs") -or $item.name.contains(".gifv") -or $item.name.contains(".gts") -or $item.name.contains(".hkm") -or $item.name.contains(".imoviemobile") -or $item.name.contains(".imovieproject") -or $item.name.contains(".ircp") -or $item.name.contains(".ismc") -or $item.name.contains(".ivr") -or $item.name.contains(".izz") -or $item.name.contains(".izzy") -or $item.name.contains(".jss") -or $item.name.contains(".jts") -or $item.name.contains(".jtv") -or $item.name.contains(".kdenlive") -or $item.name.contains(".m21") -or $item.name.contains(".m2ts") -or $item.name.contains(".m2v") -or $item.name.contains(".mgv") -or $item.name.contains(".mj2") -or $item.name.contains(".mk3d") -or $item.name.contains(".mp21"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mpgindex") -or $item.name.contains(".mpls") -or $item.name.contains(".mpv") -or $item.name.contains(".mse") -or $item.name.contains(".mtv") -or $item.name.contains(".mvd") -or $item.name.contains(".mve") -or $item.name.contains(".mxv") -or $item.name.contains(".ncor") -or $item.name.contains(".nsv") -or $item.name.contains(".ogm") -or $item.name.contains(".ogx") -or $item.name.contains(".photoshow") -or $item.name.contains(".plproj") -or $item.name.contains(".ppj") -or $item.name.contains(".pro") -or $item.name.contains(".prtl") -or $item.name.contains(".pxv") -or $item.name.contains(".qtl") -or $item.name.contains(".qtz") -or $item.name.contains(".rcd") -or $item.name.contains(".rum") -or $item.name.contains(".rvid") -or $item.name.contains(".rvl") -or $item.name.contains(".sdv") -or $item.name.contains(".sedprj") -or $item.name.contains(".seq") -or $item.name.contains(".sfvidcap") -or $item.name.contains(".siv") -or $item.name.contains(".smi"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".smk") -or $item.name.contains(".stl") -or $item.name.contains(".svi") -or $item.name.contains(".tda3mt") -or $item.name.contains(".tivo") -or $item.name.contains(".tod") -or $item.name.contains(".tp0") -or $item.name.contains(".tpd") -or $item.name.contains(".tpr") -or $item.name.contains(".tsp") -or $item.name.contains(".tvlayer") -or $item.name.contains(".tvshow") -or $item.name.contains(".usf") -or $item.name.contains(".vbc") -or $item.name.contains(".vcv") -or $item.name.contains(".vdo") -or $item.name.contains(".vdr") -or $item.name.contains(".vfz") -or $item.name.contains(".vlab") -or $item.name.contains(".wcp") -or $item.name.contains(".wmmp") -or $item.name.contains(".wvx") -or $item.name.contains(".xej") -or $item.name.contains(".xesc") -or $item.name.contains(".xfl") -or $item.name.contains(".xlmv") -or $item.name.contains(".y4m") -or $item.name.contains(".zm1") -or $item.name.contains(".zm2") -or $item.name.contains(".zm3") -or $item.name.contains(".lrec"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mp4v") -or $item.name.contains(".mpe") -or $item.name.contains(".mys") -or $item.name.contains(".par") -or $item.name.contains(".aqt") -or $item.name.contains(".gom") -or $item.name.contains(".mpv2") -or $item.name.contains(".orv") -or $item.name.contains(".rmv") -or $item.name.contains(".ssm") -or $item.name.contains(".zeg") -or $item.name.contains(".camrec") -or $item.name.contains(".zmv") -or $item.name.contains(".aec") -or $item.name.contains(".box") -or $item.name.contains(".arf") -or $item.name.contains(".dpg") -or $item.name.contains(".tvs") -or $item.name.contains(".vep") -or $item.name.contains(".rcproject") -or $item.name.contains(".smil") -or $item.name.contains(".vf") -or $item.name.contains(".60d") -or $item.name.contains(".moff") -or $item.name.contains(".vid") -or $item.name.contains(".dvr-ms") -or $item.name.contains(".bmk") -or $item.name.contains(".edl") -or $item.name.contains(".snagproj") -or $item.name.contains(".amv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".dv") -or $item.name.contains(".dv-avi") -or $item.name.contains(".eye") -or $item.name.contains(".mjp") -or $item.name.contains(".mp21") -or $item.name.contains(".pgi") -or $item.name.contains(".rmd") -or $item.name.contains(".thp") -or $item.name.contains(".avs") -or $item.name.contains(".int") -or $item.name.contains(".mp2v") -or $item.name.contains(".scn") -or $item.name.contains(".tdt") -or $item.name.contains(".ismclip") -or $item.name.contains(".m4e") -or $item.name.contains(".mpl") -or $item.name.contains(".avs") -or $item.name.contains(".evo") -or $item.name.contains(".smi") -or $item.name.contains(".mpg2") -or $item.name.contains(".vivo") -or $item.name.contains(".movie") -or $item.name.contains(".3gpp2") -or $item.name.contains(".irf") -or $item.name.contains(".asx") -or $item.name.contains(".axm") -or $item.name.contains(".cmproj") -or $item.name.contains(".dmsd3d") -or $item.name.contains(".dvx") -or $item.name.contains(".ezt") -or $item.name.contains(".mqv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".mvy") -or $item.name.contains(".prel") -or $item.name.contains(".vp7") -or $item.name.contains(".xel") -or $item.name.contains(".aet") -or $item.name.contains(".anx") -or $item.name.contains(".avc") -or $item.name.contains(".avd") -or $item.name.contains(".awlive") -or $item.name.contains(".axv") -or $item.name.contains(".bdt2") -or $item.name.contains(".bs4") -or $item.name.contains(".bvr") -or $item.name.contains(".byu") -or $item.name.contains(".camv") -or $item.name.contains(".clk") -or $item.name.contains(".cmv") -or $item.name.contains(".cx3") -or $item.name.contains(".ddat") -or $item.name.contains(".dlx") -or $item.name.contains(".dmb") -or $item.name.contains(".dmsm3d") -or $item.name.contains(".exo") -or $item.name.contains(".fbr") -or $item.name.contains(".fcarch") -or $item.name.contains(".ffd") -or $item.name.contains(".flx") -or $item.name.contains(".g64") -or $item.name.contains(".gvp") -or $item.name.contains(".imovielibrary") -or $item.name.contains(".iva"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".jmv") -or $item.name.contains(".ktn") -or $item.name.contains(".m1v") -or $item.name.contains(".m2a") -or $item.name.contains(".m4u") -or $item.name.contains(".mjpg") -or $item.name.contains(".mpsub") -or $item.name.contains(".mvex") -or $item.name.contains(".osp") -or $item.name.contains(".pns") -or $item.name.contains(".pro4dvd") -or $item.name.contains(".pro5dvd") -or $item.name.contains(".proqc") -or $item.name.contains(".pssd") -or $item.name.contains(".pva") -or $item.name.contains(".qtch") -or $item.name.contains(".qtindex") -or $item.name.contains(".qtm") -or $item.name.contains(".rp") -or $item.name.contains(".rts") -or $item.name.contains(".sbt") -or $item.name.contains(".sml") -or $item.name.contains(".theater") -or $item.name.contains(".tid") -or $item.name.contains(".tvrecording") -or $item.name.contains(".vem") -or $item.name.contains(".vfw") -or $item.name.contains(".vix") -or $item.name.contains(".vs4") -or $item.name.contains(".vse"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".wot") -or $item.name.contains(".yog") -or $item.name.contains(".mvb") -or $item.name.contains(".ssf") -or $item.name.contains(".wtv") -or $item.name.contains(".mpl") -or $item.name.contains(".xmv") -or $item.name.contains(".dif") -or $item.name.contains(".modd") -or $item.name.contains(".vft") -or $item.name.contains(".vmlt") -or $item.name.contains(".grasp") -or $item.name.contains(".moov") -or $item.name.contains(".pvr") -or $item.name.contains(".vmlf") -or $item.name.contains(".am") -or $item.name.contains(".anim") -or $item.name.contains(".bix") -or $item.name.contains(".cel") -or $item.name.contains(".cvc") -or $item.name.contains(".dsy") -or $item.name.contains(".gl") -or $item.name.contains(".ivs") -or $item.name.contains(".lsf") -or $item.name.contains(".m75") -or $item.name.contains(".mpeg1") -or $item.name.contains(".mpf") -or $item.name.contains(".msh") -or $item.name.contains(".nut") -or $item.name.contains(".pjs") -or $item.name.contains(".pmv"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- if($item.name.contains(".psb") -or $item.name.contains(".rmd") -or $item.name.contains(".rts") -or $item.name.contains(".scm") -or $item.name.contains(".sec") -or $item.name.contains(".tdx") -or $item.name.contains(".vdx") -or $item.name.contains(".viv") -or $item.name.contains(".stx"))
- {
- write-host "Item " $item.name " is a video file under the site " $web.url -fore green
- $web.url + "," + $list.title + "," + $item.ID + "," + $item.name | Out-File -Encoding Default -Append -FilePath $Output
- }
- }
- }
- }
- }
- else
- {
- write-host "Invalid Site or web .... please check the URL " $SiteOrWebURL -fore red
- }
- }
The preceding piece of code generates an output file (SiteOrWebVideoFiles.csv) with all the information captured and places it under the same location where the PowerShell script exists.
The output file has the following information:
Complete Code
The file is bigger in size. So I have attached the source code along with this article.
Execution Procedure
- Step 1: Download the script to local and copy it to the SharePoint server.
- Step 2: Launch the SharePoint management shell.
- Step 3: Navigate to the PowerShell script path.
- Step 4: Execute the script.
Enter option 1 or 2 or 3 or 4 to get the desired output.
Conclusion
Thus this article outlines how to get the details of uploaded video files at various levels (Farm, web app, site collection, site or web) in SharePoint 2010 using a PowerShell script.