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
# Searches for Sitecore items in Master database that descend from a given template, sit | |
# underneath a particular ancestor item, and are the latest version. | |
class TemplatesSearchResultItem : SearchResultItem | |
{ | |
# For items contained within an SXA index try using the name "inheritance_sm". | |
[Sitecore.ContentSearch.IndexField("_templates")] | |
[System.Collections.Generic.List[ID]]$TemplateIds | |
[Sitecore.ContentSearch.IndexField("_latestversion")] |
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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"background": "#0077c2", | |
"foreground": "#ffffff", | |
"leading_diamond": "", |
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
# | |
# Recurses through the content and finds all Renderings used by pages. Used to find any broken renderings. | |
# Assumes datasources can only be IDs, so setups that use queries can be flagged as incorrect (e.g. in SXA). | |
# | |
$rootItem = Get-Item -Path "master:/sitecore/content/website/Home" | |
$defaultLayout = (Get-LayoutDevice "Default") | |
# Set to true to only report on issues, rather than address them. If this is false, renderings deemed bad are removed! | |
$reportOnly = $True |
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
All non-INFO traces on the Content Management server: | |
traces | |
| where customDimensions.Role == "CM" | |
| where severityLevel > 1 | |
| where timestamp between(datetime("2020-05-01 14:35:00") .. datetime("2020-05-01 14:45:00")) | |
| order by timestamp desc |
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 System; | |
using System.Collections.Specialized; | |
using System.Configuration; | |
using System.Data; | |
using System.Data.SqlClient; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Web.Security; |
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
ffmpeg.exe -i "Video.mkv" -map 0 -vcodec copy -scodec copy -acodec ac3 -b:a 448k "AC3.mkv" |
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
# Functions Site Language/Remove Site Language | |
Import-Function Validate-PowerShell | |
Test-PowerShell | |
Try | |
{ | |
$ctx = Get-Item . |
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 cwd { $pwd.Path.Trim() | Set-Clipboard } |
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
# | |
# Takes a list of configuration files that should be disabled on a Content Delivery server and renames them with a | |
# .octopus_disabled suffix so they are not loaded. | |
# | |
# Prepared for Sitecore 8.1 Update 3 | |
$baseFolder = "YOUR WEBSITE FOLDER" | |
$files = ( | |
"App_Config\Include\001.Sitecore.Speak.Important.config", |
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
$item = Get-Item -Path master: -ID "{C7FF7164-CECC-44A5-9A16-784619578316}" | |
$sharedLayout = $item.__Renderings | |
$finalLayout = $item."__Final Renderings" | |
if ([Sitecore.Xml.Patch.XmlPatchUtils]::IsXmlPatch($finalLayout)) | |
{ | |
$finalLayoutFull = [Sitecore.Data.Fields.XmlDeltas]::ApplyDelta($sharedLayout, $finalLayout) | |
} |
NewerOlder