Upgrade - Puzzlepart/prosjektportalen GitHub Wiki
This article will guide you through upgrading Prosjektportalen from your current 2.x.x version to the latest version from releases. Note that upgrading from the original version of the project portal (2014 --> 2017) is not possible without a manual migration process. See this article.
The first thing we need to do is to download the latest version of Prosjektportalen from releases.
The main task of every upgrade is to run Upgrade.ps1
with arguments as described in the Upgrade.ps1 section below. This will upgrade from any previous version to the latest release you downloaded. In most cases this is enough to upgrade Prosjektportalen. Example:
.\Upgrade.ps1 -Url "https://mytenant.sharepoint.com/sites/pp"
Upgrading from version e.g. 2.3.0 to 2.3.1 or 2.3.1 to 2.3.4 is called upgrading patch-releases. In this case, you only need to run Upgrade.ps1 as specified above to upgrade.
Upgrading from version 2.0 to 2.4, 2.1 to 2.4, 2.2 to 2.4 or 2.3 to 2.4 and so forth is called upgrading a minor-release. In this case, some additional steps are required.
In some versions we have added some search schema configuration changes. Therefore, if you're on a version of Prosjektportalen before 2.5, you need to either upload search configuration again (SPO), run a script (SP2013) or manually map properties (SP2016). See Configuring Search Mappings. In any case if can be a good idea to verify that all search mappings are correct.
Finally, another script needs to be run to ensure that all existing sites have the latest features. Navigate to the scripts-folder of the downloaded release and run the script Add-MissingFeaturesToExistingProjects.ps1. You might need to use -UseWebLogin parameter if you're authenticating with MFA. Example:
cd scripts
.\Add-MissingFeaturesToExistingProjects.ps1 -Url "https://mytenant.sharepoint.com/sites/pp" -UseWebLogin
The script will iterate over existing sites and add the missing features. You should now be all set and upgraded to the latest version.
In version 2.4, we changed how project properties are persisted. To automatically upgrade existing projects, the script needs to be run with an additional parameter. This will update existing projects with the the values of the old project properties. The parameter is called PersistProjectProperties. Only use the PersistProjectProperties parameter if you are upgrading from a version earlier than 2.4. See example:
.\Add-MissingFeaturesToExistingProjects.ps1 -Url "https://mytenant.sharepoint.com/sites/pp" -UseWebLogin -PersistProjectProperties
Upgrade.ps1 [-Url <String>]
[-AssetsUrl <String>]
[-DataSourceSiteUrl <String>]
[-SkipAssets <switch>]
[-SkipThridParty <switch>]
[-SkipLoadingBundle <switch>]
[-GenericCredential <String>]
[-UseWebLogin <switch>]
[-CurrentCredentials <switch>]
[-Environment <String>]
Parameter | Type | Required | Description |
---|---|---|---|
Url | String | True | URL for the root site. |
AssetsUrl | String | False | URL for assets if you want to maintain assets in a separate site collection. Defaults to Url. |
DataSourceSiteUrl | String | False | URL for data source if you want to maintain data sources in a separate site collection. Defaults to Url. |
SkipAssets | switch | False | Skip the deployment of assets if already upgraded. Needed when upgrading multiple site collections. Upgrade Assets on first Site Collection, and use this parameter on the following Site Collections. |
SkipThirdParty | switch | False | Skip upgrading third party scripts. In case you have installed third party scripts previously. |
SkipLoadingBundle | switch | False | Do you want to handle PnP libraries and PnP PowerShell without using bundled files? If this switch is used, you need to download and install appropriate release of PnP PowerShell yourself. See https://github.com/SharePoint/PnP-PowerShell/releases |
GenericCredential | String | False | Specify the name of a generic credential if you've set up one with Windows Authentication Manager. |
UseWebLogin | switch | False | Use Web Login to connect to SharePoint. Useful for e.g. Multi-factor authentication, ADFS environments and forms based login. |
CurrentCredentials | switch | False | (primarily on-premises) Use the credentials of the current user to connect to SharePoint. Useful e.g. if you install directly from the server. |
Environment | string | False | SharePoint environment. SharePointPnPPowerShell2013, SharePointPnPPowerShell2016 or SharePointPnPPowerShellOnline. Defaults to SharePointPnPPowerShellOnline |
- Project portal is previously installed to Office 365 at https://mytenant.sharepoint.com/sites/pp
- You've downloaded the new release from Releases in this GitHub project
- You've unzipped the release to C:\temp\prosjektportalen-versionx
- You've started PowerShell and navigated to C:\temp\prosjektportalen-versionx
You can upgrade the project portal by running the Upgrade.ps1 script the following way:
.\Upgrade.ps1 -Url "https://mytenant.sharepoint.com/sites/pp"