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
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Linq; | |
using System.Management.Automation; | |
using System.Reflection; | |
using System.Threading; | |
namespace parametertest | |
{ |
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
$days = 7; | |
Get-ChildItem master:\content\home -Recurse | | |
? { $_."__updated" -gt (Get-Date).AddDays(-$days) } | | |
Format-Table -Property ID, Name, "__updated", "__updated by" |
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
Get-ChildItem "$($SitecoreLogFolder)\log*.*" | Sort-Object -Descending LastWriteTime | Select-Object -First 1 | Get-Content -Tail 10 |
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
##--INPUT --## | |
$customTemplateName = "test6"; | |
$baseTemplate="{1930BBEB-7805-47158AC7CF696}|{B7B41C45-2A6-E377DE778095}|{96224572-74-AE7E-DE43F0F6BFD9}"; | |
$layoutRenderings= | |
'<r xmlns:xsd="http://www.w3.org/2001/XMLSchema" > | |
<d id="{FE5D7FDF-89C0-4D99-9AA3-B5FBD009C9F3}" l="{19432667-2790-44EC-9673-ACAE93AE0519}"> | |
<r id="{7915EF7B--7B0D39137443}" ph="metaheader" uid="{D36E7AFC-08B5-433C13-554B20BE9569}" /> | |
<r id="{016A19CB837-E81F2B510E72}" ph="breadcrumb" uid="{2ABC1220-6C40-426-B0A2-F594EEC98D7E}" /> | |
<r id="{C5CF5F45-F21BAE6-52DBC568E33A}" ph="navheader" uid="{DA646F0700E-B09A26C8}" /> | |
<r id="{93FA9D3A-590A-467C-872F-830C1D17E147}" ph="banner" uid="{8B8E75580AF0C-32620B307B5C}" /> |
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
<# | |
.SYNOPSIS | |
The following script prompts the user for a Sitecore server role, then shows the files that are not matching the spreadsheet. | |
Based on Michael West's "SitecoreRoleConfigurator.ps1" - https://gist.github.com/michaellwest/d1124a459cb1fb47486f87d488ecfab8 | |
Important: you will need the CSV file provided by Michael at https://gist.github.com/michaellwest/d1124a459cb1fb47486f87d488ecfab8#file-config_enable-disable_sitecore_8-1_upd3-csv | |
Now it supports multiple Env Roles separated by comma thanks to @mhwelander feedback | |
.NOTES | |
Rodrigo Peplau | |
2016-09-23 |
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
<# | |
.SYNOPSIS | |
Lists the items with broken external links in the current language. | |
.NOTES | |
Daniel Scherrer | |
Adapted from the Broken Links Checker Report by Michael West. | |
#> | |
$database = "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
$dialog = Read-Variable -Parameters ` | |
@{ Name = "dictionaryDomain"; Title = "dictionary"; Source="DataSource=/sitecore/content&DatabaseName=master&IncludeTemplatesForDisplay=Dictionary domain" ; Editor="treelist"}, ` | |
@{ Name = "language"; Title = "Language"; Source="DataSource=/sitecore/system/languages" ; Editor="droplist"}, ` | |
@{ Name = "emptyOption"; Value=$true; Title = "Export empty items" ; Editor="bool"} ` | |
-Description "This script will export Dictionary data into file." ` | |
-Width 400 -Height 200 ` | |
-Title "Dictionary Toolbox" ` | |
-OkButtonName "Export" ` | |
-CancelButtonName "Cancel" |
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
[datetime]$archivedDate = [datetime]::Today.AddDays(-1) | |
Write-Host "Restoring items recycled after $($archivedDate.ToShortDateString())" | |
foreach($archive in Get-Archive -Name "recyclebin") { | |
Write-Host " - Found $($archive.GetEntryCount()) entries" | |
$entries = $archive.GetEntries(0, $archive.GetEntryCount()) | |
foreach($entry in $entries) { | |
if($entry.ArchiveLocalDate -ge $archivedDate) { | |
Write-Host "Restoring item: $($entry.OriginalLocation) {$($entry.ArchivalId)}on date $($entry.ArchiveLocalDate)" | |
$archive.RestoreItem($entry.ArchivalId) |
OlderNewer