Skip to content

Instantly share code, notes, and snippets.

View dcouto's full-sized avatar

Douglas Couto dcouto

  • Rightpoint
  • Boston, MA
View GitHub Profile
# 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))
$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)
<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>
USE [database_name]
GO
UPDATE [dbo].[aspnet_Membership]
SET [IsLockedOut] = 0
WHERE UserId = 'B09BBCDE-9B3C-4DCD-B69E-67F615CE01E9'
GO
New-UsingBlock (New-Object Sitecore.Data.BulkUpdateContext) {
Get-Item -Path master: -Query "/sitecore/content/My Site/*[@@name != 'Item Name']" | Remove-Item -Recurse -Permanently
}
powershell -ExecutionPolicy Bypass -File .\script.ps1