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
git config user.email # will return your current user email | |
git config user.email [email protected] # will set your email | |
# this will resolve the issue why on commit changes in github it doesn't show the profile of your avatar |
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
Write-Host "Stopping your iis service in order to run docker" -ForegroundColor Green | |
iisreset /stop |
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
Write-Host "Scanning any solr or nssm services to stop them in order to run docker" -ForegroundColor Green | |
$services = get-wmiobject win32_service | Where-Object {$_.pathname -match 'nssm' -or $_.name -match 'solr' } | |
$services | Foreach-Object { | |
if ($_.State -eq "Running"){ | |
$name = $_.Name | |
Write-Host "The solr service $name is running, we are stopping the service..." -ForegroundColor Yellow | |
Stop-Service -Name $_.Name | |
Write-Host "$name service is stopped" -ForegroundColor Green |
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
<# | |
Set-ExecutionPolicy RemoteSigned | |
#> | |
Import-Module -Name SPE | |
$session = New-ScriptSession -Username "Remoting" -Password "test" -ConnectionUri https://sitecore.instance.local | |
$jobId = Invoke-RemoteScript -ScriptBlock { | |
$filename = "log*" | |
Write-Verbose ("Started at " + [System.DateTime]::Now) |
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
# Load IIS module: | |
Import-Module WebAdministration | |
# Get AppPool Name | |
$appPoolName = $OctopusParameters['appPoolName'] | |
Write-Output "Starting IIS app pool $appPoolName" | |
Start-WebAppPool $appPoolName | |
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
# Load IIS module: | |
Import-Module WebAdministration | |
# Get AppPool Name | |
$appPoolName = $OctopusParameters['appPoolName'] | |
# Get the number of retries | |
$retries = $OctopusParameters['appPoolCheckRetries'] | |
# Get the number of attempts | |
$delay = $OctopusParameters['appPoolCheckDelay'] |
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
param | |
( | |
[ValidateScript( {Test-Path $_})] | |
[string]$path, | |
[switch] $force = $false | |
) | |
if (Test-Path $path) { | |
if ($path -like "*C:*" -and -not $force) { | |
Write-Error "$path is system path cannot be used" | |
} |
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
param( | |
[string]$userName, | |
[string]$permission, | |
[string]$certStoreLocation, | |
[string]$certThumbprint | |
); | |
# check if certificate is already installed | |
$certificateInstalled = Get-ChildItem cert:$certStoreLocation | Where thumbprint -eq $certThumbprint | |
# download & install only if certificate is not already installed on machine |
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
$inputProps = @{ | |
Prompt = "Enter the targeted item ID (Guid):" | |
Validation = [Sitecore.Configuration.Settings]::ItemNameValidation | |
ErrorMessage = "'`$Input' is not a valid item ID." | |
} | |
$itemId = Show-Input @inputProps | |
[Sitecore.Context]::SetActiveSite("website") | |
$urlop = [Sitecore.Links.LinkManager]::GetDefaultUrlOptions() |
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 | |
#Author: Sergejs Kravcenko | |
#Date: 12/07/2018 | |
#Description: RenewCertificate module, which allows to safely generate and issue new Sitecore Self-Signed certificates both Root and Personal in order to have Sitecore instance function correctly with its xConnect services | |
#Usage: Import-Module .\RenewCertificate.psm1 | |
Write-Host "Importing RenewCertificateModule" | |
function New-RootCertificateFn{ | |
param ( |
NewerOlder