Skip to content

Instantly share code, notes, and snippets.

View dthunziker's full-sized avatar

Derek Hunziker dthunziker

View GitHub Profile
@dthunziker
dthunziker / SendSlackMessagePostDeployAction.cs
Last active August 9, 2016 23:34
A TDS Post Deploy Step for sending Slack notifications
using HedgehogDevelopment.SitecoreProject.PackageInstallPostProcessor.Contracts;
using System;
using System.Collections.Specialized;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Web;
using System.Xml.Linq;
namespace MyProject.PostDeployActions
function Create-XmlSitemap {
<#
.SYNOPSIS
Generates an XML sitemap.
.PARAMETER SiteName
The name of the site defintion to generate the sitemap for. If omitted, the site definition matching the host name will be used.
.PARAMETER HostName
The host name that will appear in URLs. If omitted, the first hostname from the site definition will be used.
@dthunziker
dthunziker / Reset Profiles.ps1
Last active January 2, 2020 17:39
A Sitecore PowerShell Extensions script for clearing and applying profiles to one or more items
$rootItem = Get-Item .
if ($rootItem.Appearance.ReadOnly) {
Show-Alert "You cannot edit this item because it is protected."
return
}
if (!$rootItem.Security.CanWrite([Sitecore.Context]::User)) {
Show-Alert "You do not have write access to this item in order to perform this action."
return