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
| ############################################################################################ | |
| #This script is created to remove Sitecore 9 instance from local machine. | |
| #This will not uninstall Solr but, it will remove Solr collections. | |
| #The script looks at the Prefix parameter and find out all instances and remove them. | |
| #Change the default values before using the script. Or, pass the values as parameters. | |
| #Usage: .\Remove-Sitecore9-Instance.ps1 -Prefix "xp0" | |
| #Declaimer: This is a destructive script, means, it deletes files, databases etc. | |
| #Use it at your own risk. |
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
| <%@ Page Language="C#" AutoEventWireup="true" Debug="true" %> | |
| <!DOCTYPE html> | |
| <head> | |
| <title>Sitecore utilities</title> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
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/"> | |
| <!-- https://tothecore.sk/2018/05/10/adding-publishing-targets-in-sitecore-9/ --> | |
| <sitecore> | |
| <eventing defaultProvider="sitecore"> | |
| <eventQueueProvider defaultEventQueue="core"> | |
| <eventQueue name="web_secondary" patch:after="eventQueue[@name='web']" type="Sitecore.Data.Eventing.$(database)EventQueue, Sitecore.Kernel"> | |
| <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" /> | |
| <param hint="" ref="PropertyStoreProvider/store[@name='$(name)']" /> | |
| </eventQueue> |
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
| using System.Diagnostics; | |
| using System.Web.Mvc; | |
| namespace YourApp.Web.Infrastructure.Filters | |
| { | |
| /// <summary> | |
| /// Filter to display the execution time of both the action and result | |
| /// </summary> | |
| public class RequestTimingFilter : IActionFilter, IResultFilter | |
| { |
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
| [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
| $url = 'https://sitecore-cm.domain.com/sitecore/login' | |
| $password = 'yourpasseordhere' | |
| $Body = @{ | |
| User = 'username' | |
| password = $password | |
| } | |
| $LoginResponse = Invoke-WebRequest -Uri -Method Post -Headers @{"Content-Type" = "application/x-www-form-urlencoded"} ` |
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
| param( | |
| [string]$KuduPath, | |
| [string[]]$XDTs, | |
| [string]$TenantId, | |
| [string]$SubscriptionId, | |
| [string]$ResourceGroupName, | |
| [string]$WebAppServiceName, | |
| [string]$SlotName = "", | |
| [string]$ServicePrincipalID, | |
| [string]$ServicePrincipalKey, |
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-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 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
| 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 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
| 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 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
| --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.* |