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
$global:MonitoredPath = 'c:\inetpub\wwwroot' | |
$global:ExpectedDirectory = 'xp.xconnect' | |
$global:KeepGoing = $true | |
$IncludeSubfolders = $true | |
$AttributeFilter = [IO.NotifyFilters]::DirectoryName | |
try | |
{ | |
$watcher = New-Object -TypeName System.IO.FileSystemWatcher -Property @{ |
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
Import-Module WebAdministration; | |
$XConnectSiteName = "xconnect.dev.local"; # or any other IIS website you'd want to process | |
if($Params.WindowsBuild -ge 22000){ | |
Function ReplaceWebsiteBinding { | |
Param( | |
[string] $sitename, | |
[string] $oldBinding | |
); |
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
$name = $PSScriptRoot + "\" + $MyInvocation.MyCommand.Name | |
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$name`"" -Verb RunAs; exit } | |
$registryPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" | |
$Name = "LimitBlankPasswordUse" | |
$value = "0" |
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 'Running script...' | |
Set-Location master:\content | |
$pages = get-item 'master:\content\Site or Tenant' | get-childitem -Recurse | |
$device = Get-LayoutDevice -Default | |
$Results = @(); | |
foreach($page in $pages){ | |
$renderings = Get-Rendering -Item $page -Device $device -FinalLayout |
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
$rootFolder = "C:\Projects\Upgrade\SC\src" | |
$files = Get-ChildItem -Filter *serialization.config -Path $rootFolder -Recurse | |
foreach($file in $files) | |
{ | |
$newSerializationJson = New-Object -TypeName pscustomobject | |
Write-Host "Convert Started: " + $file.FullName |
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
$sql = @" | |
USE [Sitecore.Master]; | |
-- Variables | |
DECLARE @NewItemId UNIQUEIDENTIFIER = NEWID(); | |
DECLARE @ParentId UNIQUEIDENTIFIER = '{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}'; | |
DECLARE @TemplateId UNIQUEIDENTIFIER = '{76036F5E-CBCE-46D1-AF0A-4143F9B557AA}'; -- Sample Item template | |
DECLARE @TextFieldId UNIQUEIDENTIFIER = '{A60ACD61-A6DB-4182-8329-C957982CEC74}'; -- YOUR CORRECT Text field ID | |
DECLARE @Now DATETIME = GETUTCDATE(); | |
DECLARE @ItemName NVARCHAR(255) = 'FFF'; |
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
# before starting, make sure env variable "Sitecore_GraphQL_ExposePlayground" is set to "true" | |
$FileToUpload = "C:\Users\Martin\Pictures\man2x.png" | |
$MediaDestination = "Default Website/new media" | |
$Hostname = "xmc-perficient-introduction-158.sitecorecloud.io" | |
# First, obtain TWT using authorized data from user.json | |
$JWT = .\Request-Token.ps1 | |
# Next, get the upload URL from Authoring GraphQL endpoint |
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
#Run as Admin | |
# https://gist.github.com/jermdavis/6fb0a6e47d6f1342c089af4c04d29c35#file-1_install-docker-ps1 | |
param( | |
[string]$dockerEnginePath = "C:\", | |
[string]$dockerInstallPath = "C:\Docker", | |
[string]$dockerEngineUrl = "https://download.docker.com/win/static/stable/x86_64/docker-24.0.6.zip", | |
[string]$dockerZip = "docker.zip", |
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
# Provide URL to newest version of Windows Terminal Application | |
$url = 'https://github.com/microsoft/terminal/releases/download/v1.16.10261.0/Microsoft.WindowsTerminal_Win10_1.16.10261.0_8wekyb3d8bbwe.msixbundle' | |
$split = Split-Path $url -Leaf | |
# Prerequisites | |
Start-BitsTransfer -Source 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx' ` | |
-Destination $home\Microsoft.VCLibs.x86.14.00.Desktop.appx | |
Add-AppxPackage $home\Microsoft.VCLibs.x86.14.00.Desktop.appx | |
# Download |
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
# Define the path to the Sitecore bin directory | |
$folderName = "App_Config"; | |
$websiteName = "you_site_name" | |
$binPath = "C:\inetpub\wwwroot\$websiteName\$folderName" | |
# Define the destination for the temporary zip file | |
$zipFilePath = "C:\inetpub\wwwroot\$websiteName\temp\$folderName.zip" | |
# Define exclusions |