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
Invoke-Sqlcmd -ServerInstance "." ` | |
-Username "sa" ` | |
-Password "SA_PASSWORD" ` | |
-Query "SELECT GETDATE() AS TimeOfQuery" |
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
(Get-Content Web.config).replace('<add key="role:define" value="ContentDelivery" />', '<add key="role:define" value="ContentDelivery" /><add key="localenv:define" value="PreProd" />') | Set-Content Web.config |
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
$File = "c:\Projects\output.zip" | |
$ftp = "ftp://erad-test-sitecore-615907-single\eradFTP:[email protected]/site/deployments/output.zip" | |
"ftp url: $ftp" | |
$webclient = New-Object System.Net.WebClient | |
#$uri = New-Object System.Uri($ftp) | |
$uri = [uri]::EscapeUriString($ftp) |
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
stop-service solr6 | |
get-childitem -path c:\Solr\6.6.2\server\solr\Platform*\Data -recurse | remove-item -force -recurse | |
start-service solr6 | |
Restart-WebAppPool platform.dev.local |
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
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\amd64\MSBuild.exe" /nologo /maxcpucount /nodeReuse:False /property:Configuration=Debug /property:Platform="Any CPU" /property:WebConfigToTransform=C:\inetpub\wwwroot\Platform.dev.local\ /property:TransformFile=C:\Projects\Platform.dev.local\src\Project\Careers\code\web.config.xdt /property:FileToTransform=web.config /target:ApplyTransform /toolsversion:15.0 /verbosity:minimal C:\Projects\Platform.dev.local\scripts\applytransform.targets |
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" -Scope Process -Confirm:$false | |
#Set-ExecutionPolicy "RemoteSigned" -Scope CurrentUser -Confirm:$false | |
Set-ExecutionPolicy Unrestricted | |
Import-Module -Name SPE | |
$session = New-ScriptSession -Username admin -Password b -ConnectionUri http://platform.dev.local | |
Invoke-RemoteScript -ScriptBlock { |
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
/* Adds Expand all and Collapse all buttons to Content Editor */ | |
scContentEditor.prototype.onDomReady = function (evt) { | |
this.addCollapser(window.jQuery || window.$sc); | |
}; | |
scContentEditor.prototype.addCollapser = function ($) { | |
$ = $ || window.jQuery || window.$sc; | |
if (!$) { return; } |
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( | |
$installFolder = "c:\solr", | |
$solrPort = "8721", | |
$solrHost = "solr", | |
$solrSSL = $true, | |
$downloadFolder = "$PSScriptRoot" | |
) | |
$solrVersion = "7.2.1" | |
$solrName = "solr-$solrVersion" |
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
$pass = ConvertTo-SecureString -AsPlainText '123' -Force | |
$Cred = New-Object System.Management.Automation.PSCredential -ArgumentList 'Martin',$pass | |
Invoke-Command -ComputerName 192.168.173.14 -ScriptBlock { Get-ChildItem C:\ } -credential $Cred |
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
$pass = ConvertTo-SecureString -AsPlainText '123' -Force # 123 - actual password | |
$Cred = New-Object System.Management.Automation.PSCredential -ArgumentList 'Martin',$pass # Martin - actual username | |
$Session = New-PSSession -ComputerName 192.168.173.14 -Credential $Cred # IP address of remote machine | |
$remotePath = Invoke-Command -Session $session -ScriptBlock { New-Item -ItemType Directory -Force -Path Sifon } #Get-Location | |
Copy-Item -Path "c:\Some\Path\To\Local\Script.ps1" -Destination $remotePath.FullName -ToSession $session | |
Remove-PSSession $Session |
OlderNewer