Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Import-Module WebAdministration
$url = ""
$tempLocation = "C:\tempLocation"
$zippedPatch = "$tempLocation\"
$unzippedPatch = "$tempLocation\SitecoreSupportPackage"
$sitecoreRoot = "C:\InetPub\Your\Sitecore\Website"
if (!(Test-Path $tempLocation))
New-Item -ItemType Directory -Path $tempLocation
Invoke-WebRequest -Uri $url -OutFile $zippedPatch
Expand-Archive -Path $zippedPatch -DestinationPath $unzippedPatch -Force
Copy-Item "$unzippedPatch/website/*" -Destination $sitecoreRoot -Recurse -Force
Write-Host "Patch applied to $sitecoreRoot"
Remove-Item $unzippedPatch -Recurse
Remove-Item $zippedPatch -Recurse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment