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 master:/content/home | |
$newTemplate = [Sitecore.Configuration.Factory]::GetDatabase("master").Templates["Sample/Sample Item"]; | |
$item.ChangeTemplate($newTemplate) |
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
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:env="http://www.sitecore.net/xmlconfig/env/"> | |
<!-- | |
Author: https://twitter.com/epetrashen | |
Details: https://sitecorepc.wordpress.com/2020/08/12/supercharge-your-local-sitecore-instance-with-these-tips/ | |
--> | |
<sitecore env:require="Local"> | |
<hooks> | |
<hook type="Sitecore.Diagnostics.HealthMonitorHook, Sitecore.Kernel"> | |
<patch:delete /> | |
</hook> |
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
$response = Show-ModalDialog -HandleParameters @{ | |
"h"="Create an Anti-Package"; | |
"t" = "Select a package that needs an anti-package"; | |
"ic"="People/16x16/box.png"; | |
"ok"="Pick"; | |
"ask"=""; | |
"path"= "packPath:$SitecorePackageFolder"; | |
"mask"="*.zip"; | |
} -Control "Installer.Browse" |
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
select princ.name | |
, princ.type_desc | |
, perm.permission_name | |
, perm.state_desc | |
, perm.class_desc | |
, object_name(perm.major_id) | |
from sys.database_principals princ | |
left join | |
sys.database_permissions perm | |
on perm.grantee_principal_id = princ.principal_id |
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
SELECT | |
t.NAME AS TableName, | |
s.Name AS SchemaName, | |
p.rows, | |
SUM(a.total_pages) * 8 AS TotalSpaceKB, | |
CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalSpaceMB, | |
SUM(a.used_pages) * 8 AS UsedSpaceKB, | |
CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS UsedSpaceMB, | |
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB, | |
CAST(ROUND(((SUM(a.total_pages) - SUM(a.used_pages)) * 8) / 1024.00, 2) AS NUMERIC(36, 2)) AS UnusedSpaceMB |
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
--Returns all descendants of the /sitecore/template item | |
SELECT * | |
FROM ItemsPath | |
WHERE ItemPath LIKE '/sitecore/templates%' | |
--Returns all rows in the WorkflowHistory table for all | |
--descendants of the news item (/sitecore/content/Home/News) | |
SELECT WorkflowHistory.* |
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
param( | |
[Parameter(Mandatory=$true)] | |
[string]$ResourceGroupName, | |
[Parameter(Mandatory=$true)] | |
[string]$AppServiceName | |
) | |
. "https://gist.githubusercontent.com/phaniav/6ada460d24cafedd4f6803da66e575d7/raw/90b335930a24667ff12ff75241956eecc4358630/Get-KuduUtility.ps1" | |
$folderKey = -join ((97..122) | Get-Random -Count 10 | ForEach-Object {[char]$_}) |
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.Collections.Generic; | |
using System.Linq; | |
using System.Web.Services; | |
using Sitecore.Jobs; | |
[WebService(Namespace = "http://tempuri.org/")] | |
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] | |
[System.ComponentModel.ToolboxItem(false)] | |
public class PublishManager : System.Web.Services.WebService |
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-AzureRmWebAppPublishingCredentials($resourceGroupName, $webAppName, $slotName = $null){ | |
if ([string]::IsNullOrWhiteSpace($slotName) -or $slotName.ToLower() -eq "production"){ | |
$resourceType = "Microsoft.Web/sites/config" | |
$resourceName = "$webAppName/publishingcredentials" | |
} | |
else{ | |
$resourceType = "Microsoft.Web/sites/slots/config" | |
$resourceName = "$webAppName/$slotName/publishingcredentials" | |
} | |
$publishingCredentials = Invoke-AzureRmResourceAction -ResourceGroupName $resourceGroupName -ResourceType $resourceType -ResourceName $resourceName -Action list -ApiVersion 2015-08-01 -Force |
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
param( | |
[string]$KuduPath, | |
[string[]]$XDTs, | |
[string]$TenantId, | |
[string]$SubscriptionId, | |
[string]$ResourceGroupName, | |
[string]$WebAppServiceName, | |
[string]$SlotName = "", | |
[string]$ServicePrincipalID, | |
[string]$ServicePrincipalKey, |
NewerOlder