This file contains hidden or 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
# First we create the request. | |
$HTTP_Request = [System.Net.WebRequest]::Create('https://google.com') | |
$HTTP_Request.Timeout = 60000 | |
# We then get a response from the site. | |
$HTTP_Response = $HTTP_Request.GetResponse() | |
# We then get the HTTP code as an integer. | |
$HTTP_Status = [int]$HTTP_Response.StatusCode | |
If ($HTTP_Status -eq 200) { |
This file contains hidden or 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
<# | |
Set-ExecutionPolicy RemoteSigned | |
#> | |
Import-Module -Name SPE | |
$session = New-ScriptSession -Username remoteadmin -Password test -ConnectionUri https://sitecoreinstance.local | |
$jobId = Invoke-RemoteScript -ScriptBlock { | |
Write-Verbose ("Started at " + [System.DateTime]::Now) | |
$files = Get-ChildItem $SitecoreLogFolder |
This file contains hidden or 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
# specify your path here. It is most likely be page templates and page content | |
$startPath = "/sitecore/content" | |
Get-ChildItem -Path $startPath -Recurse | ForEach-Object { | |
$item = $_; | |
Get-Rendering -Item $_ -FinalLayout | ForEach-Object { | |
$rendering = $_; | |
$matches = [regex]::Matches($_.Placeholder,'(?<guid>_[\d\w]{8}\-(?:[\d\w]{4}\-){3}[\d\w]{12})(?<seed>_?\d?)') | |
if ($matches.Success) { | |
Write-Host "Match found in item - [$($item.Paths.FullPath)]" | |
Write-Host "Old Placeholder - [$($rendering.Placeholder)]" |
This file contains hidden or 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
# Usage: | |
# This script is designed to be run after you have Solr running locally without SSL | |
# It will generate a trusted, self-signed certificate for LOCAL DEV (this must be modified for production) | |
# Notes: The keystore must be under server/etc on Solr root, and MUST be named solr-ssl.keystore.jks | |
# The cert will be added to locally trusted certs, so no security warnings in browsers | |
# You must still reconfigure Solr to use the keystore and restart it after running this script | |
# | |
# THIS SCRIPT REQUIRES WINDOWS 10 (for the SSL trust); without 10 remove the lines around trusting the cert. | |
NewerOlder