Last active
April 10, 2020 03:39
-
-
Save strezag/c8a002f68ecda2424b66cd966c69aa74 to your computer and use it in GitHub Desktop.
Update the Sitecore App Center's shortcuts in the Launchpad and Start Menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$startmenuItem = Get-Item -Path "core:/sitecore/content/Documents and settings/All users/Start menu/Left/Sitecore App Center" | |
if ($null -ne $startmenuItem) { | |
Write-Host "DISABLED: `n$($startmenuItem.Name)`n$($startmenuItem.Id)`n$($startmenuItem.Paths.Path)`n" | |
$startmenuItem.Editing.BeginEdit() | |
$startmenuItem.Fields["Application"].Value = "" | |
$startmenuItem.Editing.EndEdit() > $null | |
} | |
$launchpadItem = Get-Item -Path "core:/sitecore/client/Applications/Launchpad/PageSettings/Buttons/Tools/AppCenter" | |
if ($null -ne $launchpadItem) { | |
Write-Host "`nREPURPOSED: `n$($launchpadItem.Name)`n$($launchpadItem.Id)`n$($launchpadItem.Paths.Path)" | |
$actionConfirm = Show-ModalDialog -Control "ConfirmChoice" -Parameters @{ btn_0 = "Keep and Repurpose"; btn_1 = "Disable"; btn_2 = "Cancel"; te = "Repurpose the Launchpad shortcut to link to the Sitecore Cloud Status page permalink OR disabled it?"; cp = "Launchpad Shortcut" } -Height 120 -Width 400 | |
if ($actionConfirm -eq "btn_0") { | |
$launchpadItem.Editing.BeginEdit() | |
$launchpadItem.Fields["Link"].Value = "http://status.cloud.sitecore.net/maintenance/7a812b90-36f1-48f1-acd5-2609d0a85a0a" | |
$launchpadItem.Fields["OpenNewTab"].Value = "1" | |
$launchpadItem.Editing.EndEdit() > $null | |
} | |
elseif ($actionConfirm -eq "btn_1") { | |
Move-Item -Path "core:/sitecore/client/Applications/Launchpad/PageSettings/Buttons/Tools/AppCenter" -Destination "core:/sitecore/client/Applications/Launchpad/PageSettings/Buttons" | |
Write-Host "`nDISABLED: `n$($startmenuItem.Name)`n$($startmenuItem.Id)`n/sitecore/client/Applications/Launchpad/PageSettings/Buttons`n" | |
} | |
else { Exit } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment