diff --git a/Install/Install.ps1 b/Install/Install.ps1 index c748a984b..8b527e5a6 100644 --- a/Install/Install.ps1 +++ b/Install/Install.ps1 @@ -406,6 +406,22 @@ catch { Write-Host "[WARNING] Failed to run post-install steps: $($_.Exception.Message)" -ForegroundColor Yellow } +if ($Upgrade.IsPresent) { + try { + $LastInstall = Get-PnPListItem -List "Installasjonslogg" -Query "" | Select-Object -First 1 + if ($null -ne $LastInstall) { + $PreviousVersion = $LastInstall.FieldValues["InstallVersion"] + + if ($PreviousVersion -lt "1.2.7") { + Write-Host "[INFO] In version v1.2.7 we added 'Prosjekttidslinje' to the top navigation. Adding this navigation item now as part of the upgrade" + Add-PnPNavigationNode -Location TopNavigationBar -Title "Prosjekttidslinje" -Url "$($Uri.LocalPath)/SitePages/Prosjekttidslinje.aspx" + } + } + } + catch { + Write-Host "[WARNING] Failed to run upgrade steps: $($_.Exception.Message)" -ForegroundColor Yellow + } +} $sw.Stop()