Skip to content

Instantly share code, notes, and snippets.

View RobsonAutomator's full-sized avatar

Ro Se RobsonAutomator

View GitHub Profile
@RobsonAutomator
RobsonAutomator / EnableCreativeExchangeLive.ps1
Last active December 5, 2017 09:24
Switch Creative Exchange Live
#
# Sitecore will be restarted becasue of change configuration file, please refresh browser!
#
$configDisabled = Join-Path -Path $AppPath -ChildPath "App_Config\Include\Feature\z.SPE.Sync.Enabler.Gulp.config.disabled"
$configEnabled = $configDisabled -replace '.disabled',''
if( Test-Path $configDisabled )
{
$response = Show-Confirm -Title "Enable Creative Exchange Live.`r`nSitecore will be restarted because file $configDisabled will be renamed.`r`nWould you like to continue?"
if( $response -eq 'yes')
@RobsonAutomator
RobsonAutomator / DownloadFromSitecore.ps1
Created November 27, 2017 12:07 — forked from jermdavis/DownloadFromSitecore.ps1
Download files from dev.sitecore.net from the commandline
param(
[Parameter(Mandatory=$true)]
[string]$url,
[Parameter(Mandatory=$true)]
[string]$target
)
function Fetch-WebsiteCredentials
{
$file = "dev.creds.xml"
@RobsonAutomator
RobsonAutomator / pssolrservice.ps1
Created November 13, 2017 10:13
Install Solr as Windows Service without dependencies
#
# PSSolrService.ps1
#
<# region Description
###############################################################################
# #
# File name PSService.ps1 #
# #
# Description A sample service in a standalone PowerShell script #
# #
@RobsonAutomator
RobsonAutomator / AdminRights.ps1
Last active November 10, 2017 16:13
Check if current user has administrator rights
if( -not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Write-Warning -Message "Please run this script with Administrator rights"
return
}
@RobsonAutomator
RobsonAutomator / Install-Solr.ps1
Created November 2, 2017 23:19 — forked from jermdavis/Install-Solr.ps1
A PowerShell script to help installing Solr as a service
Param(
$solrVersion = "6.6.2",
$installFolder = "c:\solr",
$solrPort = "8983",
$solrHost = "solr",
$solrSSL = $true,
$nssmVersion = "2.24",
$JREVersion = "1.8.0_151"
)
@RobsonAutomator
RobsonAutomator / get-sslconnections.ps1
Created October 30, 2017 20:20
Displays all processes listening on port 443
# Gets all processes listening on TCP port 443
(Get-NetTCPConnection -LocalPort 443 -State Listen | Select-Object @{Name="Id";Expression={$_.OwningProcess}} | Get-Process).ProcessName
@RobsonAutomator
RobsonAutomator / copy-toS3.ps1
Created September 18, 2017 21:54
Copy files to S3
#Initialize-AWSDefaults
Get-S3Bucket -BucketName [Name]
$items = Get-ChildItem -Path "C:\Users\Administrator\Desktop" -Filter *.bak
foreach( $item in $items )
{
Write-S3Object -BucketName [Name] -File "C:\Users\Administrator\Desktop\$item"
}
@RobsonAutomator
RobsonAutomator / Set-AzureStorageForSitecore.ps1
Created September 12, 2017 13:16
Create and configure Azure storage account for Sitecore deployment
# #############################################################################
# Set-AzureStorageForSitecore
#
# AUTHOR: Robert Senktas
# BLOG: http://lets-share.senktas.net/2017/09/sitecore-on-azure-storagepreparation.html
#
# #############################################################################
#Requires –Modules sitecore-automation
#Requires -Modules Azure
@RobsonAutomator
RobsonAutomator / Copy-ItemAcl
Last active August 21, 2017 13:37
Copies a Sitecore item access rights from one identity to another identity.
<#
.Synopsis
Copies an item access rights from one identity to another identity.
.EXAMPLE
Copy-ItemAcl -FromIdentity 'SUPER\ROBSONAUTOMATOR' -ToIdentity 'LAZY\ONE' -Path "/sitecore/content/Home"
.Author
Robert Senktas
#>
function Copy-ItemAcl{
[CmdletBinding()]
@RobsonAutomator
RobsonAutomator / Test-SitecoreAzureDeployment.ps1
Created July 18, 2017 16:01
Check if all resources required to deploy Sitecore on Azure are supported in Location region
# #############################################################################
# Test-SitecoreAzureDeployment
#
# AUTHOR: Robert Senktas
# BLOG: http://lets-share.senktas.net/2017/07/sitecore-on-azure-test-sitecoreazuredeployment.html
#
# COMMENT: Check if all resources required to deploy Sitecore on Azure are supported in Location region
# This function is part of Sitecore Automation Module
# #############################################################################
function Test-SitecoreAzureDeployment