Resolve-PnPFolder

Returns a folder from a given site relative path, and will create it if it does not exist.

Syntax

Resolve-PnPFolder
       -SiteRelativePath <String>
                        [-Includes <String[]>]
                        [-Web <WebPipeBind>]
                        [-Connection <SPOnlineConnection>]

Description

Returns a folder from a given site relative path, and will create it if it does not exist. If you do not want the folder to be created, for instance just to test if a folder exists, use Get-PnPFolder

Examples

------------------EXAMPLE 1------------------

Resolve-PnPFolder -SiteRelativePath "demofolder/subfolder"

Creates a folder called subfolder in a folder called demofolder located in the root folder of the site. If the folder hierarchy does not exist, it will be created.

Parameters

-Connection

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

Type:SPOnlineConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Includes

Specify properties to include when retrieving objects from the server.

Type:String[]
Position:0
Accept pipeline input:False
Accept wildcard characters:False
-SiteRelativePath

Site Relative Folder Path

Type:String
Position:0
Accept pipeline input:False
Accept wildcard characters:False
-Web

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

Type:WebPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.SharePoint.Client.Folder