external help file | applicable | schema |
---|---|---|
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online |
2.0.0 |
Adds a file to a PnP Provisioning Template
Add-PnPFileToProvisioningTemplate -Path <String>
-Source <String>
-Folder <String>
[-Container <String>]
[-FileLevel <FileLevel>]
[-TemplateProviderExtensions <ITemplateProviderExtension[]>]
[-FileOverwrite [<SwitchParameter>]]
PS:> Add-PnPFileToProvisioningTemplate -Path template.pnp -Source $sourceFilePath -Folder $targetFolder
Adds a file to a PnP Provisioning Template
PS:> Add-PnPFileToProvisioningTemplate -Path template.xml -Source $sourceFilePath -Folder $targetFolder
Adds a file reference to a PnP Provisioning XML Template
PS:> Add-PnPFileToProvisioningTemplate -Path template.pnp -Source "./myfile.png" -Folder "folderinsite" -FileLevel Published -FileOverwrite:$false
Adds a file to a PnP Provisioning Template, specifies the level as Published and defines to not overwrite the file if it exists in the site.
PS:> Add-PnPFileToProvisioningTemplate -Path template.pnp -Source $sourceFilePath -Folder $targetFolder -Container $container
Adds a file to a PnP Provisioning Template with a custom container for the file
The target Container for the file to add to the in-memory template, optional argument.
Type: String
Parameter Sets: (All)
Required: False
Position: 3
Accept pipeline input: False
The level of the files to add. Defaults to Published
Type: FileLevel
Parameter Sets: (All)
Required: False
Position: 4
Accept pipeline input: False
Set to overwrite in site, Defaults to true
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: 5
Accept pipeline input: False
The target Folder for the file to add to the in-memory template.
Type: String
Parameter Sets: (All)
Required: True
Position: 2
Accept pipeline input: False
Filename of the .PNP Open XML provisioning template to read from, optionally including full path.
Type: String
Parameter Sets: (All)
Required: True
Position: 0
Accept pipeline input: False
The file to add to the in-memory template, optionally including full path.
Type: String
Parameter Sets: (All)
Required: True
Position: 1
Accept pipeline input: False
Allows you to specify ITemplateProviderExtension to execute while loading the template.
Type: ITemplateProviderExtension[]
Parameter Sets: (All)
Required: False
Position: 4
Accept pipeline input: False