Pnp PowerShell Export Import Site

On 02/07/2025

In Powershell

 

Define JSON configuration https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/configuring-the-pnp-provisioning-engine

Connect-PnPOnline -Url $siteUrl -ClientId $clientId -Tenant $tenantName -Thumbprint $cert
 

$xml = Get-PnPSiteTemplate -Out $SchmaXMLPath -Configuration $configPath

# Invoke-PnPSiteTemplate -Path $SchmaXMLPath



{
  "$schema": "https://aka.ms/sppnp-extract-configuration-schema",
  "handlers": [
    "ContentTypes",
    "Fields",
    "Lists"
  ],
  "persistAssetFiles": false,
  "lists": {
    "lists": [
      {
        "title": "Eutelsat Entity",
        "includeItems": false,
        "query": {
          "includeAttachments": false
        }
      }
    ]
  },
  "contentTypes": {
    "groups": [
      "Market Access"
    ]
  }
}

 

powershell Sharepoint

No ratings yet - be the first to rate this.