Last active
December 5, 2017 09:24
-
-
Save RobsonAutomator/7d425dab0f37a353a37ca522b93ba62e to your computer and use it in GitHub Desktop.
Switch Creative Exchange Live
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
# | |
# Sitecore will be restarted becasue of change configuration file, please refresh browser! | |
# | |
$configDisabled = Join-Path -Path $AppPath -ChildPath "App_Config\Include\Feature\z.SPE.Sync.Enabler.Gulp.config.disabled" | |
$configEnabled = $configDisabled -replace '.disabled','' | |
if( Test-Path $configDisabled ) | |
{ | |
$response = Show-Confirm -Title "Enable Creative Exchange Live.`r`nSitecore will be restarted because file $configDisabled will be renamed.`r`nWould you like to continue?" | |
if( $response -eq 'yes') | |
{ | |
Rename-Item -Path $configDisabled -NewName $configEnabled | |
} | |
} | |
elseif( Test-Path $configEnabled ) | |
{ | |
$response = Show-Confirm -Title "Disable Creative Exchange Live.`r`nSitecore will be restarted because file $configEnabled will be renamed.`r`nWould you like to continue?" | |
if( $response -eq 'yes') | |
{ | |
Rename-Item -Path $configEnabled -NewName $configDisabled | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment