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
| $connection = [Hangfire.JobStorage]::Current.GetConnection() | |
| $recurringJobs = [Hangfire.Storage.StorageConnectionExtensions]::GetRecurringJobs($connection) | |
| $props = @{ | |
| Title = "Hangfire Recurring Jobs" | |
| InfoTitle = "Recurring Jobs Report" | |
| InfoDescription = "This report provides details on the currently scheduled recurring jobs." | |
| PageSize = 25 | |
| Property = @( | |
| "Id", |
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
| Import-Function -Name Invoke-SqlCommand | |
| $connection = [Sitecore.Configuration.Settings]::GetConnectionString("master") | |
| $query = @" | |
| DELETE FROM [Sitecore.Masterx].[dbo].[Publishing_ActivationLock] | |
| DELETE FROM [Sitecore.Masterx].[dbo].[Publishing_Data_Params_FieldIds] | |
| DELETE FROM [Sitecore.Masterx].[dbo].[Publishing_Data_Params_Languages] | |
| DELETE FROM [Sitecore.Masterx].[dbo].[Publishing_JobManifest] | |
| DELETE FROM [Sitecore.Masterx].[dbo].[Publishing_JobMetadata] |
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
| Product | Filepath | Filename | DefaultExtension | Provider | CD | CM | PRC | CMP | RPT | |
|---|---|---|---|---|---|---|---|---|---|---|
| Platform | \website\ | Web.config | config | Enable | Enable | Enable | Enable | Enable | ||
| Platform | \website\App_Config\ | Commands.config | config | Enable | Enable | Enable | Enable | Enable | ||
| Platform | \website\App_Config\ | ConnectionStrings.config | config | Enable | Enable | Enable | Enable | Enable | ||
| Platform | \website\App_Config\ | ConnectionStringsOracle.config | config | Enable | Enable | Enable | Enable | Enable | ||
| Platform | \website\App_Config\ | FieldTypes.config | config | Enable | Enable | Enable | Enable | Enable | ||
| Platform | \website\App_Config\ | Icons.config | config | Enable | Enable | Enable | Enable | Enable | ||
| Platform | \website\App_Config\ | LanguageDefinitions.config | config | Enable | Enable | Enable | Enable | Enable | ||
| Platform | \website\App_Config\ | MimeTypes.config | config | Enable | Enable | Enable | Enable | Enable | ||
| Platform | \website\App_Config\ | Portraits.config | config | Enable | Enable | Enable | Enable | Enable |
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
| <# | |
| .SYNOPSIS | |
| Data Import Wizard provides a way to generate or update content from an external file. | |
| .DESCRIPTION | |
| The import file uses the properties "Name" and "Id" to help match existing items. | |
| .NOTES | |
| Requires Sitecore PowerShell Extensions 4.6 or newer. | |
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
| $matchedItems = [System.Collections.ArrayList]@() | |
| $revisionFilter = @("9323dec0-9b37-4fae-b87c-2dc12cbea0f2") | |
| Get-ChildItem -Path "master:\media library" -Recurse | | |
| Where-Object { [string]::IsNullOrEmpty($PSItem["__revision"]) -or $revisionFilter -contains $PSItem["__revision"] } | | |
| ForEach-Object { $matchedItems.Add([PSCustomObject]@{"ItemId"=$PSItem.ID; "RevisionId"=$PSItem["__revision"]; "ItemPath"=$PSItem.ItemPath}) > $null } | |
| $matchedItems | Show-ListView |
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 Get-ItemUrl { | |
| param( | |
| [item]$Item, | |
| [Sitecore.Sites.SiteContext]$SiteContext | |
| ) | |
| $result = New-UsingBlock(New-Object Sitecore.Sites.SiteContextSwitcher $siteContext) { | |
| New-UsingBlock(New-Object Sitecore.Data.DatabaseSwitcher $item.Database) { | |
| [Sitecore.Links.LinkManager]::GetItemUrl($item) | |
| } |
NewerOlder