daily pastebin goal
20%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 42 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #
  2. # Sitecore will be restarted becasue of change configuration file, please refresh browser!
  3. #
  4. $configDisabled = Join-Path -Path $AppPath -ChildPath "App_Config\Include\Feature\z.SPE.Sync.Enabler.Gulp.config.disabled"
  5. $configEnabled = $configDisabled -replace '.disabled',''
  6.  
  7. if( Test-Path $configDisabled )
  8. {
  9.     $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?"
  10.     if( $response -eq 'yes')
  11.     {
  12.         Rename-Item -Path $configDisabled  -NewName $configEnabled
  13.     }
  14. }
  15. elseif( Test-Path $configEnabled )
  16. {
  17.     $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?"
  18.     if( $response -eq 'yes')
  19.     {
  20.         Rename-Item -Path $configEnabled -NewName $configDisabled
  21.     }
  22. }
RAW Paste Data
Top