Skip to content

Instantly share code, notes, and snippets.

@michaellwest
Created August 6, 2015 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save michaellwest/179e7f2af3b6bb68a566 to your computer and use it in GitHub Desktop.
Save michaellwest/179e7f2af3b6bb68a566 to your computer and use it in GitHub Desktop.
Read all bytes of a file from the Sitecore PowerShell Extensions remoting service.
Import-Module -Name SPE
$session = New-ScriptSession -Username admin -Password b -ConnectionUri http://console
$bytes = Invoke-RemoteScript -Session $session -ScriptBlock {
[System.IO.File]::ReadAllBytes("$($SitecoreDataFolder)packages\SPE Remoting-3.1.zip")
}
[System.IO.File]::WriteAllBytes("C:\temp\SPE Remoting-3.1.zip", $bytes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment