Skip to content

Instantly share code, notes, and snippets.

View SoulOfUniverse's full-sized avatar
🤖

Sergejs Kravcenko SoulOfUniverse

🤖
View GitHub Profile
@SoulOfUniverse
SoulOfUniverse / GetLogsTemotely.ps1
Created July 13, 2021 19:18
Sitecore Powershell Get Sitecore Logs Remotely
<#
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)
@SoulOfUniverse
SoulOfUniverse / StoppingSolrNssmServices.ps1
Created August 25, 2021 12:45
Sopping Solr/Nssm services Powershell prior starting up Docker
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
@SoulOfUniverse
SoulOfUniverse / StopIISService.ps1
Created August 25, 2021 12:47
Stop IIS Service
Write-Host "Stopping your iis service in order to run docker" -ForegroundColor Green
iisreset /stop
@SoulOfUniverse
SoulOfUniverse / Github email change.ps
Created October 28, 2021 08:57
Github change email
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