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
function Merge-XdtTransform { | |
<# | |
.SYNOPSIS | |
A function to apply Xml Configuration Transforms without the need for Microsoft.Web.XmlTransform.dll. | |
.NOTES | |
Michael West | |
.EXAMPLE | |
Merge-XdtTransform -Base $xmlBase -Transform $xmlTransform |
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
/* Modified version of the cleanup script provided by Sitecore Support. This version runs with a counter to help run in small batches. */ | |
create table #UnusedBlobIDs ( | |
ID UNIQUEIDENTIFIER PRIMARY KEY (ID) | |
); | |
WITH [ExistingBlobs] ([BlobId]) AS ( | |
SELECT [Blobs].[BlobId] | |
FROM [Blobs] | |
JOIN [SharedFields] |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<log4net> | |
<!-- Add a StringMatchFilter into the LogFileAppender --> | |
<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender, Sitecore.Logging"> | |
<filter type="log4net.Filter.StringMatchFilter"> | |
<stringToMatch value="Results endpoint exception" /> | |
<acceptOnMatch value="false" /> | |
</filter> |
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
$lines = @" | |
/sitecore/content/home | |
"@ | |
$paths = $lines.Split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries) | |
foreach($path in $paths) { | |
Get-Item -Path ($path.Replace("/sitecore", "master:")) | Export-UnicornItem | |
} |
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
Clear-Host | |
Import-Module -Name SPE -Force | |
$scriptDirectory = & { | |
if ($psISE) { | |
Split-Path -Path $psISE.CurrentFile.FullPath | |
} else { | |
$PSScriptRoot | |
} |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- | |
Purpose: Adds in an additional location to load IAR files from | |
This config can be removed if the project is upgraded to 10.2+ since the path is set ootb | |
--> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"> | |
<sitecore> | |
<databases> | |
<database id="master" role:require="Standalone or ContentManagement"> | |
<dataProviders> |
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
Exception: System.Security.Authentication.AuthenticationException | |
Message: The remote certificate is invalid according to the validation procedure. | |
Source: System | |
at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) | |
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) | |
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) | |
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) | |
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) | |
at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest) | |
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) |
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
# Potential workaround for errors: | |
# https://stackoverflow.com/questions/2675133/c-sharp-ignore-certificate-errors | |
# https://stackoverflow.com/a/66882479/1277533 | |
$webRequest = [Net.WebRequest]::Create("https://www.company.com") | |
try { $webRequest.GetResponse() } catch {} | |
$cert = $webRequest.ServicePoint.Certificate | |
#$bytes = $cert.Export([Security.Cryptography.X509Certificates.X509ContentType]::Cert) | |
#set-content -value $bytes -encoding byte -path "$pwd\company.cer" | |
#certutil.exe -verify -urlfetch "$pwd\company.cer" |
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
docker ps -q | ForEach-Object { "Name,IPAddress" } { $data = docker inspect $_ --format '{{json .Name}},{{range .NetworkSettings.Networks}}{{json .IPAddress}}{{end}}'; $data.replace('/','') } | ConvertFrom-Csv | |
<# | |
Name IPAddress | |
---- --------- | |
spe-traefik-1 172.31.127.71 | |
spe-cm-1 172.31.126.246 | |
spe-id-1 172.31.116.201 | |
spe-mssql-1 172.31.120.96 | |
spe-solr-1 172.31.121.74 |
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
index=iis sourcetype=ms:iis:auto NOT cs_uri_stem="/sitecore/service/keepalive.aspx" NOT cs_User_Agent="*PRTG+Network+Monitor*" cs_uri_stem="/sxa/search/results*" | rex field=cs_uri_query max_match=0 "[\&]?(?<qkey>[^=]+)=(?<qvalue>[^&]+)?" | |
| eval fields = mvzip(qkey,qvalue) | |
| mvexpand fields | |
| eval pairs=split(fields,",") | |
| eval key=mvindex(pairs,0), value=mvindex(pairs,1) | |
| fields cs_host cs_uri_query a g q | |
| eval a=urldecode(a) | |
| eval g=urldecode(g) | |
| eval q=urldecode(q) | |
| stats values(*) as * by cs_uri_query |
NewerOlder