Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 1.11 KB

GetPnPFolder.md

File metadata and controls

33 lines (27 loc) · 1.11 KB

#Get-PnPFolder Return a folder object ##Syntax

Get-PnPFolder [-Web <WebPipeBind>]
              -RelativeUrl <String>

##Detailed Description Retrieves a folder if it exists. Use Ensure-PnPFolder to create the folder if it does not exist.

##Returns

Microsoft.SharePoint.Client.Folder

##Parameters

Parameter Type Required Description
RelativeUrl String True Site or server relative URL of the folder to retrieve. In the case of a server relative url, make sure that the url starts with the managed path as the current web.
Web WebPipeBind False The web to apply the command to. Omit this parameter to use the current web.
##Examples

###Example 1

PS:> Get-PnPFolder -RelativeUrl "Shared Documents"

Returns the folder called 'Shared Documents' which is located in the root of the current web

###Example 2

PS:> Get-PnPFolder -RelativeUrl "/sites/demo/Shared Documents"

Returns the folder called 'Shared Documents' which is located in the root of the current web