Skip to content

Instantly share code, notes, and snippets.

View codebox-89's full-sized avatar
🏠
Working from home

CodeBox codebox-89

🏠
Working from home
View GitHub Profile
@codebox-89
codebox-89 / createcert.json
Created November 23, 2022 16:04 — forked from x3mxray/createcert.json
install_iis_certificate
{
"Parameters": {
"CertificateName": {
"Type": "String",
"Description": "The name of the certificate to be created.",
"DefaultValue": ""
},
"CertPath": {
"Type": "String",
"Description": "The physical path on disk where certificates will be stored.",
@codebox-89
codebox-89 / UnusedMediaItems.ps1
Created October 21, 2022 13:19 — forked from michaellwest/UnusedMediaItems.ps1
Sitecore PowerShell script to locate media items without reference to any other item.
<#
.SYNOPSIS
Lists all media items that are not linked to other items.
.NOTES
Michael West
#>
# HasReference determines if the specified item is referenced by any other item.
function HasReference {
$item = Get-Item master:/content/home
$newTemplate = [Sitecore.Configuration.Factory]::GetDatabase("master").Templates["Sample/Sample Item"];
$item.ChangeTemplate($newTemplate)