Created
January 24, 2017 09:39
-
-
Save jammykam/14d2d29ad15e727c0182545d60a5fef3 to your computer and use it in GitHub Desktop.
Sitecore PowerShell script to generate an anti-update package as a TDS Post Deploy Script - http://wp.me/p2SmN4-fh
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
$tempFolder = [Sitecore.Update.Utils.FileUtils]::InstallationHistoryRoot | |
$historyFolder = [Sitecore.MainUtil]::MapPath($tempFolder) | |
#get the latest update folder | |
$latestUpdate = Get-ChildItem -Path $historyFolder | Sort-Object LastAccessTime -Descending | Select-Object -First 1 | |
Write-Host $latestUpdate.FullName | |
[Sitecore.Update.Engine.PackageGenerator]::ConvertRollbackPackage( ` | |
$latestUpdate.FullName + "\rollbackPackage.rlb", ` | |
$latestUpdate.FullName + "\rollbackPackage.update") | |
Write-Log "[TDSPostDeploy::SPE] Generated rollback package to $($latestUpdate.FullName)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment