Last active
August 29, 2015 14:23
-
-
Save michaellwest/6c150c1344e86533e61f to your computer and use it in GitHub Desktop.
The following downloads images from the media library in the master db and dynamically detects the file extension.
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
# The following downloads an item from the media library in the master db and dynamically detects the file extension. | |
$session = New-ScriptSession -Username admin -Password b -ConnectionUri http://remotesitecore | |
Receive-MediaItem -Session $session -Path "/sitecore/media library/Images/Icons/accuracy" -Destination C:\Images\ -Force |
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
# The following downloads all the items from the media library in the specified path. | |
$session = New-ScriptSession -Username admin -Password b -ConnectionUri http://remotesitecore | |
Invoke-RemoteScript -Session $session -ScriptBlock { | |
Get-ChildItem -Path "master:/sitecore/media library/Images/" | Select-Object -Expand ItemPath | |
} | Receive-MediaItem -Session $session -Destination C:\Temp\Images\ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment