PowerShell leveraging WEBDAV to get listing of files in a SharePoint 2013 Document Library

While on a personal site collection the other day, I opened a document library in Explorer. By chance, I looked at the properties of one of the files in explorer.

What did I see for the document library at https://my.org/personal/MyAccountName/Documents ?


I fired up PowerShell on my desktop and decided to see if I could get a directory listing without leveraging any PSSnapins, Modules or custom code. Quick Answer is YES we can!

Get-ChildItem \\my.org@SSL\DavWWWRoot\personal\MyAccountName\Documents

Returns System.IO.DirectoryInfo (https://msdn.microsoft.com/en-us/library/system.io.directoryinfo(v=vs.110).aspx )

I shared this with some other colleagues and they were happy.

Automate Away!