This file contains hidden or 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
$DotNETCoreUpdatesPath = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Updates\.NET Core" | |
$DotNetCoreItems = Get-Item -ErrorAction Stop -Path $DotNETCoreUpdatesPath | |
$NotInstalled = $True | |
$DotNetCoreItems.GetSubKeyNames() | Where { $_ -Match "Microsoft .NET Core.*Windows Server Hosting" } | ForEach-Object { | |
$NotInstalled = $False | |
Write-Host "The host has installed $_" | |
} | |
If ($NotInstalled) { | |
Write-Host "Can not find ASP.NET Core installed on the host" | |
} |
This file contains hidden or 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 Write-EmbeddedFile | |
{ | |
param | |
( | |
[string]$base64, | |
[string]$targetFile | |
) | |
process | |
{ | |
$Content = [System.Convert]::FromBase64String($base64) |
This file contains hidden or 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
[environment]::GetEnvironmentVariable("JAVA_HOME") | |
[environment]::GetEnvironmentVariable("SOLR_HOME") |
This file contains hidden or 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-WebSite | ForEach-Object { | |
$binPath = Join-Path -Path $_.PhysicalPath -ChildPath "bin\Sitecore.Kernel.dll" | |
$item = Get-Item -Path $binPath -ErrorAction SilentlyContinue | |
if( $item -ne $null ) | |
{ | |
"Sitecore Site: Name:$($_.Name), Version: $($item.VersionInfo.FileVersion), Path $($_.PhysicalPath)" | |
} | |
} |
This file contains hidden or 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 "SQL" -ForegroundColor Green | |
Get-Service *SQL* | |
Write-Host "SOLR" -ForegroundColor Green | |
Get-Service *solr* | |
(gwmi win32_service|?\{$_.name -like "*solr*"}).pathname | |
Write-Host "Mongo" -ForegroundColor Green | |
Get-Service *mongo* | |
(gwmi win32_service|?{$_.name -like "*mongo*"}).pathname |
This file contains hidden or 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
$SitecoreModuleName = 'SitecoreInstallFramework' | |
$SitecoreRepositoryUrl = 'https://sitecore.myget.org/F/sc-powershell/api/v2' | |
$SitecoreRepositoryName = 'SCGallery' | |
# Install NuGet package repository | |
Install-PackageProvider "NuGet" -MinimumVersion 2.8 -Force | Out-Null | |
# Install Sitecore's powershell gallery | |
$SCGallery = Get-PSRepository $SitecoreRepositoryName -ErrorAction SilentlyContinue | |
If ($null -eq $SCGallery) { |
This file contains hidden or 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
user_pref("browser.bookmarks.showMobileBookmarks", true); | |
user_pref("browser.ctrlTab.previews", true); | |
user_pref("browser.download.autohideButton", false); | |
user_pref("browser.download.panel.shown", true); | |
user_pref("browser.library.activity-stream.enabled", false); | |
user_pref("browser.newtabpage.activity-stream.feeds.places", true); | |
user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false); | |
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false); | |
user_pref("browser.newtabpage.activity-stream.filterAdult", false); | |
user_pref("browser.newtabpage.activity-stream.prerender", false); |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<!-- | |
This configuration adds "preview" publishing target as a copy of production-like "web" database for Sitecore 9.3 | |
Please refer to a full guide video for the usage instructions: https://youtu.be/... | |
WARNING! | |
This configuration is done for demo purposes only, do not use it as is. |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/"> | |
<sitecore role:require="Standalone or ContentDelivery or ContentManagement" search:require="solr"> | |
<contentSearch> | |
<configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch"> | |
<indexes hint="list:AddIndex"> | |
<index id="sitecore_preview_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider"> | |
<param desc="name">$(id)</param> | |
<param desc="core">DigitalEcosystem_preview_index</param> | |
<param desc="propertyStore" ref="contentSearch/indexConfigurations/databasePropertyStore" param1="$(id)" /> |
This file contains hidden or 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 "(local)" -Query "` | |
DECLARE @dbnames NVARCHAR(MAX) SET @dbnames = ''` | |
DECLARE @alter NVARCHAR(MAX) SET @alter = ''` | |
DECLARE @statement NVARCHAR(MAX) SET @statement = ''` | |
` | |
SELECT @dbnames = @dbnames + ',[' + name + ']' FROM sys.databases WHERE NAME LIKE 'Platform_%'` | |
SELECT @alter = @alter + 'ALTER DATABASE [' + name + '] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;' FROM sys.databases WHERE NAME LIKE 'Platform_%'` | |
IF LEN(@dbnames) > 0` | |
BEGIN` | |
EXEC sp_executesql @alter` |