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
[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 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 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 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 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 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
# Add the Sitecore MyGet repository to PowerShell | |
#Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2 | |
# Install the Sitecore Install Framwork module | |
#Install-Module SitecoreInstallFramework | |
# Install the Sitecore Fundamentals module (provides additional functionality for local installations like creating self-signed certificates) | |
#Install-Module SitecoreFundamentals | |
# Import the modules into your current PowerShell context (if necessary) |
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( | |
$solrVersion = "6.6.2", | |
$installFolder = "c:\solr", | |
$solrPort = "8983", | |
$solrHost = "solr", | |
$solrSSL = $true, | |
$nssmVersion = "2.24", | |
$JREVersion = "1.8.0_151" | |
) |
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
# Install Chocolatey if it's not already installed | |
if (-Not (Get-Command -Name choco -ErrorAction SilentlyContinue)) { | |
Set-ExecutionPolicy RemoteSigned | |
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
refreshenv | |
} | |
# Core (All Machines) | |
choco install 7zip.install -y | |
choco install googlechrome -y |
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
CREATE LOGIN NewAdminName WITH PASSWORD = 'ABCD' | |
GO | |
--Here is how you create a User with db_owner privileges using the Login you just declared: | |
Use YourDatabase; | |
GO | |
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'NewAdminName') | |
BEGIN | |
CREATE USER [NewAdminName] FOR LOGIN [NewAdminName] | |
EXEC sp_addrolemember N'db_owner', N'NewAdminName' |
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
Download locaton: https://download.microsoft.com/download/B/F/2/BF2EDBB8-004D-47F3-AA2B-FEA897591599/SQLServer2016-SSEI-Expr.exe |