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
Import-Function -Name Compress-Archive | |
# The archive filename will closely resemble the format of the default logfile names. | |
$archiveName = "logs.$([datetime]::Now.ToString("yyyy-MM-dd.HHmmss"))" | |
$archiveDirectory = "$($SitecoreDataFolder)\archived\" | |
$logDirectory = "$($SitecoreDataFolder)\logs\" | |
$archivePath = Join-Path -Path $archiveDirectory -ChildPath $archiveName | |
Compress-Archive -Path $logDirectory –CompressionLevel Fastest -DestinationPath $archivePath | Out-Download |
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
$previouslySelectedKey = "previously.selected.databases"; #you should change this to something that makes sense to you | |
$previouslySelectedString = [Sitecore.Web.UI.HtmlControls.Registry]::GetString($previouslySelectedKey); | |
$previouslySelected = $previouslySelectedString.Split(","); | |
$targets = [ordered]@{"Web"="web"; "Preview"="webpreview"}; | |
$props = @{ | |
Parameters = @( @{ Name="selectedTargets"; Title="Choose Targets"; Editor="checklist"; Options=$targets; Value=$previouslySelected; Tooltip = "Select one or more targets" } ) | |
Title = "Publish Item and Local Data" | |
Description = "Select the relevant publishing settings for the item." | |
Width = 500 |
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
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 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
/* 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 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
<?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 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
$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 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
Clear-Host | |
Import-Module -Name SPE -Force | |
$scriptDirectory = & { | |
if ($psISE) { | |
Split-Path -Path $psISE.CurrentFile.FullPath | |
} else { | |
$PSScriptRoot | |
} |
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
<?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 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
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 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
# 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" |
NewerOlder