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 Create-Xdt( | |
| [string] $prodConfig, | |
| [string] $devConfig, | |
| [string] $xdtFile, | |
| [string[]] $keepNodes = @(), | |
| [hashtable] $findReplace = @{}, | |
| [string[]] $keyAttributes = @("name", "key", "path", "contract") | |
| ) | |
| { | |
| if([System.String]::IsNullOrEmpty($prodConfig) -or |
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 Where-TemplateDerives { | |
| param( | |
| [Parameter(Mandatory=$true,ValueFromPipeline=$true)] | |
| [Sitecore.Data.Items.Item]$Item, | |
| [Parameter(Mandatory=$true,Position=0)] | |
| [string]$TemplateID | |
| ) | |
| process { |
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
| Get-ChildItem "$($SitecoreLogFolder)\log*.*" | Sort-Object -Descending LastWriteTime | Select-Object -First 1 | Get-Content -Tail 10 |
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: rdiff path/to/left,path/to/right [-s path/to/summary/dir] ### | |
| ### ADD LOCATION OF THIS SCRIPT TO PATH ### | |
| ######################################################################### | |
| [CmdletBinding()] | |
| param ( | |
| [parameter(HelpMessage="Stores the execution working directory.")] | |
| [string]$ExecutionDirectory=$PWD, | |
| [parameter(Position=0,HelpMessage="Compare two directories recursively for differences.")] |
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
| $days = 7; | |
| Get-ChildItem master:\content\home -Recurse | | |
| ? { $_."__updated" -gt (Get-Date).AddDays(-$days) } | | |
| Format-Table -Property ID, Name, "__updated", "__updated by" |
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
| <!-- | |
| A set of performance optimizations for development that vastly increase application startup time. | |
| Should not be used in production, as they largely disable forensic diagnostics that you'd want there over fast startup time after a compile. | |
| --> | |
| <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
| <sitecore> | |
| <hooks> | |
| <hook type="Sitecore.Diagnostics.HealthMonitorHook, Sitecore.Kernel"> | |
| <patch:delete /> |
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-StrictMode -Version Latest | |
| $payload = @{ | |
| "channel" = "#my-channel" | |
| "icon_emoji" = ":bomb:" | |
| "text" = "This is my message. Hello there!" | |
| "username" = "Mr. Robot" | |
| } | |
| Invoke-WebRequest ` |
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 Update-MediaItem { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true)] | |
| [ValidateNotNullOrEmpty()] | |
| [string]$filePath, | |
| [Parameter(Position=1, Mandatory=$true)] | |
| [ValidateNotNullOrEmpty()] | |
| [string]$mediaPath) |
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" ?> | |
| <control xmlns:def="Definition" xmlns="http://schemas.sitecore.net/Visual-Studio-Intellisense"> | |
| <Sitecore.Shell.Applications.Dialogs.SelectRendering> | |
| <FormDialog ID="Dialog" Icon="Core/32x32/open_document.png" Header="Open Item" | |
| Text="Select the item that you wish to open. Then click the Open button." OKButton="Open"> | |
| <Stylesheet Src="SelectItemWithThumbnails.css" DeviceDependant="true" /> | |
| <CodeBeside Type="MyProject.CMS.Custom.Dialogs.SelectRenderingTabbed.SelectRenderingForm, ARM.CMS.Custom"/> | |
| <DataContext ID="DataContext" Root="/"/> |