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 -Modules Azure | |
# ############################################################################# | |
# Get SAS tokents | |
# | |
# AUTHOR: Robert Senktas | |
# BLOG: http://lets-share.senktas.net/2017/07/sitecore-on-azure-sas-token.html | |
# | |
# COMMENT: | |
# ############################################################################# |
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
# | |
# PSSolrService.ps1 | |
# | |
<# region Description | |
############################################################################### | |
# # | |
# File name PSService.ps1 # | |
# # | |
# Description A sample service in a standalone PowerShell script # | |
# # |
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
-- Change [bucket] with your bucket name | |
exec msdb.dbo.rds_restore_database | |
@restore_db_name='Sitecore_Analytics', | |
@s3_arn_to_restore_from='arn:aws:s3:::[bucket]/Sitecore_Analytics.bak'; | |
exec msdb.dbo.rds_restore_database | |
@restore_db_name='Sitecore_Core', | |
@s3_arn_to_restore_from='arn:aws:s3:::[bucket]/Sitecore_Core.bak'; |
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
$property = @( | |
@{Name='Email';Expression={ $PSItem.Profile.GetCustomProperty('Email') }}, | |
@{Name='FirstName';Expression={ $PSItem.Profile.GetCustomProperty('FirstName') }}, | |
@{Name='LastName';Expression={ $PSItem.Profile.GetCustomProperty('LastName') }}, | |
@{Name='Title';Expression={ $PSItem.Profile.GetCustomProperty('Title') }}, | |
@{Name='Company';Expression={ $PSItem.Profile.GetCustomProperty('Company') }}, | |
@{Name='Country';Expression={ $PSItem.Profile.GetCustomProperty('Country') }}, | |
@{Name='ZipCode';Expression={ $PSItem.Profile.GetCustomProperty('ZipCode') }}, | |
@{Name='Department';Expression={ $PSItem.Profile.GetCustomProperty('Department') }}, | |
@{Name='Street';Expression={ $PSItem.Profile.GetCustomProperty('Street') }}, |
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" $_ | |
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) | |
#> |
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); |
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 Get-DefaultSpeConfig() | |
{ | |
# $AppPath is SPE console variable, see Variables on https://doc.sitecorepowershell.com/interfaces.html | |
if( $AppPath -ne $null ) | |
{ | |
return Join-Path -Path $AppPath -ChildPath "App_Config\Include\Cognifide.PowerShell.config" | |
} | |
} | |
function Set-UAC4SPE |
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 | |
# Description: Export Sitecore dictionary items for selected language. | |
$parentItem = {DC0FC646-AAB3-4D7A-B265-7AC5CDC73905} | |
$dialog = Read-Variable -Parameters ` | |
@{ Name = "language"; Title = "Language"; Source="DataSource=/sitecore/system/Languages" ; Editor="droplist"} ` | |
-Description "This script will export Dictionary data into file." ` | |
-Width 800 -Height 600 ` | |
-Title "Simple Dictionary Export Utility" ` |
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 { |
NewerOlder