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
powershell -ExecutionPolicy Bypass -File .\script.ps1 |
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
New-UsingBlock (New-Object Sitecore.Data.BulkUpdateContext) { | |
Get-Item -Path master: -Query "/sitecore/content/My Site/*[@@name != 'Item Name']" | Remove-Item -Recurse -Permanently | |
} |
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
USE [database_name] | |
GO | |
UPDATE [dbo].[aspnet_Membership] | |
SET [IsLockedOut] = 0 | |
WHERE UserId = 'B09BBCDE-9B3C-4DCD-B69E-67F615CE01E9' | |
GO |
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/"> | |
<sitecore> | |
<pipelines> | |
<coveoInboundFilterPipeline> | |
<processor type="MySolution.Coveo.Custom.InboundFilters.IsPublishableInboundFilter, MySolution.Coveo.Custom" /> | |
</coveoInboundFilterPipeline> | |
</pipelines> | |
</sitecore> | |
</configuration> |
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
$master = [Sitecore.Configuration.Factory]::GetDatabase("master"); | |
$commonFolderTemplate = $master.Templates["Common/Folder"]; | |
$allItems = Get-ChildItem -Path '/sitecore/content/United States/Home/Test Pages' -Recurse | |
ForEach ($item in $allItems) { | |
if($item.TemplateName -match "Local Content Folder") { | |
Write-Host $item.FullPath | |
$item.ChangeTemplate($commonFolderTemplate) |
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
# https://andrewwburns.com/2018/03/01/create-a-self-signed-certificate-for-development/ | |
New-SelfSignedCertificate -CertStoreLocation Cert:\LocalMachine\My -DnsName "mysite.local" -Friend | |
lyName "mysite.local" -NotAfter $([datetime]::now.AddYears(5)) |
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
$allItems = Get-ChildItem -Path '/sitecore/content/Default Datasources/Default Featured Data List' -Recurse | |
ForEach ($item in $allItems) { | |
# Write-Host $item.FullPath | |
$item.Editing.BeginEdit() | |
$item["__Read Only"] = "1" | |
$item.Editing.EndEdit() | |
} |
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
EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'prefix_Core' | |
GO | |
USE [master] | |
GO | |
DROP DATABASE [prefix_Core] | |
GO | |
EXEC msdb.dbo.sp_delete_database_backuphistory @database_name = N'prefix_EXM.Master' | |
GO | |
USE [master] |
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
$items = Get-Item master: -Query "/sitecore//*" | |
Write-Host $items.Length | |
$items | ForEach-Object { | |
try { | |
[Sitecore.Globals]::LinkDatabase.UpdateReferences($_) | |
# [Sitecore.Globals]::LinkDatabase.UpdateItemVersionReferences($_) | |
} | |
catch { |
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 | |
D.name, | |
F.Name AS FileType, | |
F.physical_name AS PhysicalFile, | |
F.state_desc AS OnlineStatus, | |
CAST((F.size*8)/1024 AS int) AS [FileSize (MB)] | |
--CAST(F.size*8 AS VARCHAR(32)) as SizeInBytes | |
FROM | |
sys.master_files F | |
INNER JOIN sys.databases D ON D.database_id = F.database_id |
NewerOlder