Created
July 13, 2015 18:20
-
-
Save michaellwest/7ab517810a50f2881985 to your computer and use it in GitHub Desktop.
The following uploads images from the filesystem to the media library in the master db.
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 uploads a single image with a new name to the specified path in the media library in the master db. | |
$session = New-ScriptSession -Username admin -Password b -ConnectionUri http://remotesitecore | |
Send-MediaItem -Session $session -Path C:\Images\banner.jpg -Destination "/sitecore/media library/Images/banner.jpg" |
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 uploads all of the images in a directory to the specified path in the media library in the master db. | |
$session = New-ScriptSession -Username admin -Password b -ConnectionUri http://remotesitecore | |
Get-ChildItem -Path C:\Images | Send-MediaItem -Session $session -Destination "/sitecore/media library/Images/" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment