View ExceptionMessage.txt
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) |
View CheckCertRevocation.ps1
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" |
View inspect.ps1
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 |
View SplunkQuery.txt
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 |
View CurlCMError.ps1
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
$containers = docker ps -a --format "table {{.Names}}" | |
$container = $containers | ConvertFrom-Csv | Where-Object { $_.NAMES -match "-cm" } | Select-Object -First 1 -ExpandProperty NAMES | |
docker exec $container curl http://cm |
View DatabaseMissing.yml
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
--- | |
ID: "9c7e7d60-bfa0-4fec-b55c-462b3efdd545" | |
Parent: "839b77db-6040-4f00-8771-8e96fd37aba2" | |
Template: "854ba861-63ea-4a0c-8c7b-541e9a7ec4c1" | |
Path: /sitecore/system/Settings/Foundation/Scms/Search/Search Query Rules Context/Tags/Default | |
DB: master |
View ResolveUser.cs
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
using Microsoft.AspNet.Identity; | |
using Sitecore.Diagnostics; | |
using Sitecore.Owin.Authentication.Extensions; | |
using Sitecore.Owin.Authentication.Pipelines.CookieAuthentication.SignIn; | |
using Sitecore.Owin.Authentication.Services; | |
using Sitecore.Security.Accounts; | |
using System.Security.Claims; | |
namespace Scms.Feature.Security.Pipelines.CookieAuthentication.SignIn | |
{ |
View PullAllDockerImages.ps1
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 image ls --format "{{json .Repository}},{{json .Tag}},{{json .ID}}" | | |
ConvertFrom-Csv -Header "Repository","Tag","Id" | | |
Where-Object { $_.Tag -ne "<none>" -and $_.Repository.Contains("/") } | | |
ForEach-Object { docker pull "$($_.Repository):$($_.Tag)"} |
View FindItemsWithRules.ps1
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
<# | |
.SYNOPSIS | |
Report all the PowerShell Script (Library) items which contain a ShowRule or EnableRule | |
.NOTES | |
Michael West | |
#> | |
$items = Get-ChildItem -Path "master:" -ID "{A3572733-5062-43E9-A447-54698BC1C637}" -Recurse | Where-Object { ($_.ShowRule -and $_.ShowRule -ne "<ruleset />") -or ($_.EnableRule -and $_.EnableRule -ne "<ruleset />") } |
View CompareFieldChanges.ps1
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 Get-ModifiedItem { | |
param( | |
$databaseName, | |
$filename | |
) | |
$resourceLoaderType = ([System.Type]::GetType("Sitecore.Data.DataProviders.ReadOnly.Protobuf.IResourceLoader, Sitecore.Data.ResourceItems.ProtobufNet")) | |
$resourceLoader = [Sitecore.DependencyInjection.ServiceLocator]::ServiceProvider.GetService($resourceLoaderType) | |
$paths = [System.Collections.Generic.List[String]]@() | |
$paths.Add([Sitecore.MainUtil]::MapPath("/App_Data/items/$($databaseName)/$($filename)")) > $null |
NewerOlder