Skip to content

Latest commit

 

History

History
97 lines (71 loc) · 2.22 KB

Get-PnPFolder.md

File metadata and controls

97 lines (71 loc) · 2.22 KB
external help file applicable schema
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online
2.0.0

Get-PnPFolder

SYNOPSIS

Return a folder object

SYNTAX

Get-PnPFolder -Url <String>
              [-Web <WebPipeBind>]
              [-Includes <String[]>]
              [-Connection <SPOnlineConnection>]

DESCRIPTION

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

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

PARAMETERS

-Includes

Specify properties to include when retrieving objects from the server.

Type: String[]
Parameter Sets: 

Required: False
Position: 0
Accept pipeline input: False

-Url

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.

Type: String
Parameter Sets: (All)
Aliases: RelativeUrl

Required: True
Position: 0
Accept pipeline input: True

-Web

The web to apply the command to. Omit this parameter to use the current web.

Type: WebPipeBind
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

-Connection

Optional connection to be used by cmdlet. Retrieve the value for this parameter by eiter specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: SPOnlineConnection
Parameter Sets: (All)

Required: False
Position: Named
Accept pipeline input: False

OUTPUTS

RELATED LINKS

SharePoint Developer Patterns and PracticesEnsure-PnPFolder