New-PSDrive to SharePoint Office 365

How can I create a New-PSDrive to an instance of Office 365 over WebDAV?

I know I can do it by using the map network drive in the Windows Shell (then specyfing connect to Web site).

Just passing -Credentials into New-PsDrive does not work, I believe because Office 365 requires passing SAML tokens.

Please help.

Thx,

Adam

February 21st, 2014 1:08am

WebDAV  is not an available provider in PowerShell.  You need NTFS (FileSystem) or other providers that can be custom installed.

Free Windows Admin Tool Kit Click here and download it now
February 21st, 2014 3:00am

Thank you, OK -- I will ask the question differently:

Is there a way to connect an instance of SharePoint to New-PSDrive ?

Thx,

Adam

February 21st, 2014 3:17pm

Thank you, OK -- I will ask the question differently:

Is there a way to connect an instance of SharePoint to New-PSDrive ?

Thx,

Adam

No.  There is not yet a provider for O365.  You can use WebDAV from Explorer and the drive will show up in PowerShell.

Free Windows Admin Tool Kit Click here and download it now
February 21st, 2014 4:17pm

You can do it by adding a third party provider:

PS > InstallUtil Nivot.PowerShell.SharePoint.dll
...
PS > Add-PSSnapin Nivot.PowerShell.SharePoint
PS > New-PSDrive wss SharePoint http://localserver[:port]/[site/name]
PS > cd wss:
PS wss:\>

http://pssharepoint.codeplex.com/

February 21st, 2014 4:21pm

With Windows 8 and WIndows 7 SP1 with patches we can map a drive using PowerShell v3 or later.

$unc= '\\<yourdomain>.sharepoint.com@SSL\Shared Documents'
New-PsDrive -Name S -PSProvider FileSystem -Root $unc

To authenticate just connect any folder in Sarepoint using "Open with Explorer" on the SharePoint Library menu.

Free Windows Admin Tool Kit Click here and download it now
February 24th, 2014 8:03am

There is a comprehensive example of drive mapping to Office 365 with Powershell including the automation of Internet Explorer to perform the authentication here office365drivemap.codeplex.com

Myles Jeffery | Thinkscape Limited

Map network drives to OneDrive for Business and SharePoint Online document libraries - Reliably

Try Our File Share Migration Tool for OneDrive for Business and SharePoint Online Office 365
March 26th, 2015 4:14am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics