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
Write-Host "Starting work in the context of the 'master' database, under /sitecore/content/website1/Data item." | |
Set-Location -Path "master:/sitecore/content/website1/Data" | |
# Set up variables | |
$workflowState1 = "{xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}" #ID of the workflow states. | |
$workflowState2 = "{yyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy}" | |
$workflowState3 = "{zzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz}" | |
function Update-Workflows { |
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:role="http://www.sitecore.net/xmlconfig/role/" xmlns:security="http://www.sitecore.net/xmlconfig/security/" xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore role:require="ContentManagement or Standalone"> | |
<reflection> | |
<allowedMethods> | |
<descriptor type="Spe.Client.Applications.UploadFile.PowerShellUploadFileForm" methodName="CancelClick" assemblyName="Spe" hint="Cancel"/> | |
<descriptor type="Spe.Client.Applications.UploadFile.PowerShellUploadFileForm" methodName="OKClick" assemblyName="Spe" hint="Ok"/> | |
<descriptor type="Spe.Client.Applications.UploadFile.PowerShellUploadFileForm" methodName="StartUploading" assemblyName="Spe" hint="StartUploading"/> | |
<descriptor type="Spe.Client.Applications.UploadFile.PowerShellUploadFileForm" methodName="EndUploading" assemblyName="Spe" hint="EndUploading"/> | |
<descriptor type="Spe.Client.Applications.UploadFile.PowerShellUploadFile |
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
# Revert to previous deployment | |
kubectl rollout undo deployments/<deployment name> | |
#Example: To revert CD deployment to the previous state | |
kubectl rollout undo deployments/cd | |
# To get the Revisions which were deployed | |
kubectl rollout history deployment/<deployment name> | |
#Example: To get the Revision history of CM | |
kubectl rollout history deployment/cm |
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
{ | |
"LogConfig": { | |
"sources": [ | |
{ | |
"type": "EventLog", | |
"startAtOldestRecord": true, | |
"eventFormatMultiLine": false, | |
"channels": [ | |
{ | |
"name": "system", |
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
# Display list of all contexts in the current machine | |
kubectl config get-contexts | |
# Display the current-context | |
kubectl config current-context | |
# Set the default context to my-cluster-name | |
kubectl config use-context <my-cluster-name> | |
# Get all the nodes |
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
# Get into Windows Pod and access Powershell inside the pod | |
kubectl exec -it <podname> -- powershell | |
# To view the content inside a file, for example web.config | |
Get-Content web.config | |
# Get top 100 lines of the file | |
Get-Content web.config -First 100 | |
# Get last 100 lines of the file |
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
cm: | |
image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xp1-cm:${VERSION:-latest} | |
build: | |
context: ./docker/build/cm | |
args: | |
BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cm:${SITECORE_VERSION} | |
SPE_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-spe-assets:${SPE_VERSION} | |
SXA_IMAGE: ${SITECORE_MODULE_REGISTRY}sitecore-sxa-xp1-assets:${SXA_VERSION} | |
TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION} | |
BMF_IMAGE: konabos/brightcove-sitecore-media-framework:10.1-1809 |
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
RUN Get-ChildItem .\src\Foundation\ –Recurse –Include *.csproj | ForEach-Object { msbuild $_.FullName /p:Configuration=$env:BUILD_CONFIGURATION /p:DeployOnBuild=True /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:PublishUrl=C:\out\website }; | |
RUN Get-ChildItem .\src\Feature\ –Recurse –Include *.csproj | ForEach-Object { msbuild $_.FullName /p:Configuration=$env:BUILD_CONFIGURATION /p:DeployOnBuild=True /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:PublishUrl=C:\out\website }; | |
RUN Get-ChildItem .\src\Project\ –Recurse –Include *.csproj | ForEach-Object { msbuild $_.FullName /p:Configuration=$env:BUILD_CONFIGURATION /p:DeployOnBuild=True /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:PublishUrl=C:\out\website }; | |
#OR | |
RUN msbuild .\MySitecore.sln /p:Configuration=$env:BUILD_CONFIGURATION /p:DeployOnBuild=True /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:PublishUrl=C:\out\website |
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
# Execute below statement in all the shard DBs | |
UPDATE [__ShardManagement].[ShardsLocal] SET ServerName ='<new db server name>', DatabaseName = '<restored new shard xDB db name with new prefix>' | |
# Execute below statement in the ShardMapManager DB against each Shard DB | |
UPDATE [__ShardManagement].[ShardsGlobal] SET ServerName ='<new db server name>', DatabaseName = '<restored new shard xDB db name with new prefix>' WHERE DatabaseName = '<new shard xDB db1 name with old prefix>' | |
UPDATE [__ShardManagement].[ShardsGlobal] SET ServerName ='<new db server name>', DatabaseName = '<restored new shard xDB db name with new prefix>' WHERE DatabaseName = '<new shard xDB db2 name with old prefix>' | |
UPDATE [__ShardManagement].[ShardsGlobal] SET ServerName ='<new db server name>', DatabaseName = '<restored new shard xDB db name with new prefix>' WHERE DatabaseName = '<new shard xDB dbn name with old prefix>' |
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
// Get the current URL from the page where the AJAX call has been made | |
var url = HttpContext.Current.Request.UrlReferrer; // Note the UrlReferrer | |
// Get the context | |
var siteContext = SiteContextFactory.GetSiteContext(url.Host, url.PathAndQuery); | |
if (siteContext?.StartPath == null) | |
{ | |
throw new Exception(); // log or handle the exception | |
} |
OlderNewer