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
#set variables for script | |
$solutionPath = "C:\Projects\myproject" #path to your VS Solution | |
$solutionName = "MyProject.sln" #the name of your VS Solution | |
$deleteTDSProjectsFromSolution = $true #if the script should remove the TDS projects from the solution file | |
$tidyUpTDSFilesAndFolders = $true #if the script should remove all physical TDS project files and .item/.yaml files on disk | |
$tidyUpParentFolders = $true #If the script should remove empty parent folders | |
#find all TDS projects | |
Push-Location $solutionPath |
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
- name: Setup VSTest Path | |
uses: darenm/[email protected] | |
- name: Install Coverlet | |
run: dotnet tool install --global coverlet.console | |
shell: cmd | |
- name: Run Coverlet & Unit Tests for all test projects | |
run: | | |
$basePath = "." |
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
workflow Sitecore-DB-Maintenance-Plan-Workflow-RB | |
{ | |
<# | |
.SYNOPSIS | |
Azure Runbook Workflow that finds fragmented database tables and re-indexes them | |
.DESCRIPTION | |
Finds any tables with a average fragmentation higher than the defined $FragPercentage and then indexes them | |
.PARAMETER SqlServer | |
Your SQL Server Name (e.g 'my-sql-server.database.windows.net') | |
.PARAMETER Database |
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
<# *** Script to disable/enable all non admin users. Allows a selection of admin users to exclude - includes safey check for 'sitecore/admin' user *** #> | |
write-host "Enabling / Disabling users.." | |
write-host | |
$options = @{ | |
"Disable"="disable" | |
"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
### Adds IAR Check and message to Content Editor ### | |
#IARs method for GetItemLocations() are only available in 10.2 an above - so return if Sitecore 9 -> 10.1 | |
$sitecoreversion = [Sitecore.Configuration.About]::Version | |
if ($sitecoreversion.StartsWith('9') -or $sitecoreversion.StartsWith('10.0') -or $sitecoreversion.StartsWith('10.1')) | |
{ | |
#Sorry this is only for Sitecore 10.2+ and XMCloud | |
exit | |
} |
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
#*** converts an Publish.xml file to the new Sitecore CLI Json format *** | |
#helper functions | |
function CheckNamePart($namePart){ | |
$namePart = $namePart.Replace(' ','') | |
$namePart = $namePart.Replace('{','') | |
$namePart = $namePart.Replace('}','') | |
return $namePart | |
} |
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/"> | |
<sitecore> | |
<services> | |
<configurator type="FluxiDigtal.Foundation.DependencyInjection.ServicesConfigurator, FluxiDigtal.Foundation.DependencyInjection"> | |
</configurator> | |
</services> | |
</sitecore> | |
</configuration> |
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/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"> | |
<sitecore> | |
<services> | |
<configurator type="FluxiDigtal.Foundation.DependencyInjection.MvcControllerServicesConfigurator, FluxiDigtal.Foundation.DependencyInjection"> | |
<!--turn on option on CD--> | |
<param desc="useMyCustomCache" role:require="ContentDelivery">true</param> | |
</configurator> | |
</services> | |
</sitecore> |
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
# Set the username of the user whose locked items you want to unlock | |
$username = "admin" | |
# Get a list of all items locked by the specified user | |
$lockedItems = Get-ChildItem -Path "master:\" -Recurse | Where-Object { | |
$_.Locking.IsLocked -and $_.Locking.LockedBy -eq $username | |
} | |
# Unlock all items in the list | |
foreach ($item in $lockedItems) { |
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
# Set the necessary parameters for the new item | |
$itemName = "My New Item" | |
$itemTemplate = "{76036F5E-CBCE-46D1-AF0A-4143F9B557AA}" #Sample Item | |
$parentItemPath = "/sitecore/content/Home" | |
# Create the new item | |
$newItem = New-Item -ItemType $itemTemplate -Name $itemName -Path $parentItemPath | |
# Set the new item's field values | |
$newItem.Editing.BeginEdit() |
NewerOlder