Last active
November 6, 2018 17:19
-
-
Save michaellwest/bf51c1cf39c5c119c710fa84ffbb73d5 to your computer and use it in GitHub Desktop.
Sitecore PowerShell Extensions example transferring items between servers using rainbow serialization and spe remoting. You will want to be using SPE 5.1 or newer when transferring media items.
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
Import-Module -Name "SPE" | |
$session = New-ScriptSession -user "admin" -pass "b" -conn "https://spe-a" | |
$yaml = Invoke-RemoteScript -ScriptBlock { | |
$homeId = "{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}" | |
Get-ChildItem -Path "master:" -ID $homeId -WithParent -Recurse | | |
ConvertTo-RainbowYaml | |
} -Session $session | |
$session2 = New-ScriptSession -user "admin" -pass "b" -conn "https://spe-b" | |
Invoke-RemoteScript -ScriptBlock { | |
$using:yaml | Import-RainbowItem | |
} -Session $session2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment