Get-SPOFile

Retrieves a specific File from a given Site.

Get-SPOFile -Web <SPOWebPipeBind> -Url <String>

Parameters

1

ParameterRequiredTypeDescription
WebTrueSPOWebPipeBind

Specifies the identity of the Site containing the File to retrieve.

The type must be a valid server relative URL, in the form /site_name, or an SPOWeb object, Microsoft.SharePoint.Client.Web object, or GUID representing the Site ID.

UrlTrueString

The server relative URL to the file to retrieve.

Detailed Description

Retrieve a specific SPOFile object from a Site given the server relative URL to the file. The Site provided by the -Web parameter must correspond to the Site where the file is located or else an argument out of range exception will be thrown.

Copyright 2016 Falchion Consulting, LLC

> For more information on this cmdlet and others:

> http://blog.falchionconsulting.com/

> Use of this cmdlet is at your own risk.

> Gary Lapointe assumes no liability.

Examples

------------------EXAMPLE------------------

PS C:\> Get-SPOFile -Web "/" -Url "/Shared Documents/MyFile.docx"

Retrieves the file MyFile.docx from the Documents library within the root Site of the current Site Collection.