Last active
January 6, 2022 22:44
-
-
Save jhorsman/d22d688c24d665c1e1d670abd255eec3 to your computer and use it in GitHub Desktop.
Synchronize SDL Web components (by publication) with schemas using PowerShell
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
#WARNING this script is set to run component-sync with the -Update flag, meaning it will commit and save the changed components | |
#Usage examples | |
# .\item-sync-publications.ps1 | |
# .\item-sync-publications.ps1 | Tee-Object sync.log | |
# Prerequisite: Install the tridion-powershell-modules https://github.com/pkjaer/tridion-powershell-modules | |
Import-Module Tridion-CoreService -Verbose:$false | |
Set-TridionCoreServiceSettings -Version "2013-SP1" | |
$publications = Get-TridionPublications | Where-Object {!$_.Title.StartsWith("_")} | Where-Object {!$_.Title.Contains("Test")} | |
ForEach ($pub in $publications) { | |
Write-Output ("Syncing publication {0} {1}" -f $pub.Id, $pub.Title) | |
.\item-sync.ps1 $pub.Id -Update | |
Write-Output "" | |
} | |
Write-Output "" | |
Write-Output "Done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment