View fix-size-field-in-media-items.ps
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
# | |
# Fix value '123 x 123' in Size field to the proper image size (bytes). | |
# Author: Robert Senktas | |
# | |
$sitecorePath = "master:/sitecore/media library" | |
$processedItems = Get-ChildItem -Path $sitecorePath -Recurse | ForEach-Object { | |
if ( $_.Size -match "x" ) { | |
$mediaItem = New-Object "Sitecore.Data.Items.MediaItem" $_ | |
View Convert-ScriptItemToFile.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
function Convert-ScriptItemToFile { | |
<# | |
.SYNOPSIS | |
Convers a SPE item to a file on disk. | |
.NOTES | |
Autor: Robert Senktas (@RobsonAutomator) | |
#> |
View set-contentdefaultlanguage.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
# Author: Robert Senktas vel @RobsonAutomator | |
# Scritp to use with Sitecore PowerShell Extension | |
$user = Get-User -Identity $me -Authenticated | |
$options = [ordered]@{}; | |
$languages = Get-ChildItem -Path 'master:/sitecore/system/Languages/' | |
foreach( $language in $languages ) | |
{ | |
$options.Add($language.Name, $language.Name); |
View create-zip-performance-tests.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
$archivePath = "E:\Test" | |
$folderToArchive = "E:\Temp\FolderToCompress" | |
# prepare output folder | |
mkdir $archivePath -Force | |
Clear-Host | |
for( $i = 0; $i -lt 10; $i++ ) | |
{ | |
$measureExtract = Measure-Command { |
View expand-zip-performance.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
$archivePath = "C:\test80MB.zip" | |
$destinationFolder = "D:\Test" | |
mkdir $destinationFolder -Force | |
Clear-Host | |
for( $i = 0; $i -lt 10; $i++ ) | |
{ | |
$measureExpand = Measure-Command { |
View showconfig.cshtml
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 Sitecore.Configuration | |
<!-- Author: Robert Senktas vel RobsonAutomator --> | |
<!-- Remove this file from server after usage --> | |
<!-- http://<hostname>/showconfig.cshtml?save=true saves xml to the App_Data folder --> | |
@{ | |
if (!Context.Request.IsLocal) | |
{ | |
Response.StatusCode = 404; | |
return; | |
} |
View copy-items.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
$destination = 'master:\sitecore\templates\' | |
$source = 'master:\sitecore\templates\' | |
$items = Get-ChildItem -Path $source | |
#use -WhatIf to check | |
Get-ChildItem -Path $destination | Remove-Item | |
foreach( $item in $items ) | |
{ | |
Copy-Item $item.ItemPath $destination |
View update-license.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
#requires -RunAsAdministrator | |
# Update all licenses | |
# You can find more about automation with Powershell on http://lets-share.senktas.net | |
$iisRoot = "C:\inetpub\wwwroot" | |
$licenseFile = "C:\license.xml" | |
(Get-ChildItem -Path $iisRoot -Filter 'license.xml' -Recurse).DirectoryName | % { Copy-Item -Path $licenseFile -Destination $_ -Verbose} |
View sif-requirement.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
#requires -RunAsAdministrator | |
#requires -Version 5.1 | |
#requires -module SitecoreInstallFramework | |
#requires -module SitecoreInstallExtensions | |
View Install-Sitecore8.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
#requires -RunAsAdministrator | |
#requires -Version 5.1 | |
#requires -module SitecoreInstallFramework | |
#requires -module SitecoreInstallExtensions | |
#SIF will install SitecoreInstallExtension; we haven't to import module explicit | |
Import-Module SitecoreInstallFramework | |
$folderRoot = "C:\Users\Administrator\Downloads" |
NewerOlder