Skip to content

Instantly share code, notes, and snippets.

@RobsonAutomator
Last active December 5, 2017 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobsonAutomator/7d425dab0f37a353a37ca522b93ba62e to your computer and use it in GitHub Desktop.
Save RobsonAutomator/7d425dab0f37a353a37ca522b93ba62e to your computer and use it in GitHub Desktop.
Switch Creative Exchange Live
#
# 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