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
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
$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
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
$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
New-Item ` | |
'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.3\Server' ` | |
-Force | Out-Null | |
New-ItemProperty ` | |
-path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.3\Server' ` | |
-name 'Enabled' -value '0' -PropertyType 'DWord' -Force | Out-Null | |
New-ItemProperty ` | |
-path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.3\Server' ` |
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
Param ( | |
[string[]]$Address = $(1..20 | %{"192.168.1.$_"}), | |
[int]$Threads = 5 | |
) | |
write-host "Distributing addresses around jobs" | |
$JobAddresses = @{} | |
$CurJob = 0 | |
$CurAddress = 0 | |
while ($CurAddress -lt $Address.count) |
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
gci -r -include "*.csproj" | foreach-object { $a = $_.fullname; ( Get-Content -Raw $a -Encoding UTF8) | foreach-object { $_ -replace 'Microsoft.CodeDom.Providers.DotNetCompilerPlatform.\d+.\d+.\d+\\build\\net\d{1,3}\\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props','Microsoft.CodeDom.Providers.DotNetCompilerPlatform.3.6.0\build\net472\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.targets' } | set-content -NoNewLine $a -Encoding UTF8} | |
gci -r -include "*.csproj" | foreach-object { $a = $_.fullname; ( Get-Content -Raw $a -Encoding UTF8) | foreach-object { $_ -replace 'Microsoft.Net.Compilers.\d+.\d+.\d+','Microsoft.Net.Compilers.3.9.0' } | set-content -NoNewLine $a -Encoding UTF8} | |
gci -r -include "packages.config" | foreach-object { $a = $_.fullname; ( Get-Content -Raw $a -Encoding UTF8) | foreach-object { $_ -replace '<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="\d+.\d+.\d+" targetFramework="net\d{1,3}" ','<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatfo |
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
# You may want to clean up \bin and \obj folders | |
#Get-ChildItem .\ -include bin,obj -Recurse | ForEach-Object ($_) { Remove-Item $_.FullName -Force -Recurse } | |
gci -r -include "*.csproj" | foreach-object { $a = $_.fullname; ( Get-Content -Raw $a -Encoding UTF8) | foreach-object { $_ -replace '<Project ToolsVersion="12.0"','<Project ToolsVersion="15.0"' } | set-content -NoNewLine $a -Encoding UTF8} | |
gci -r -include "*.csproj" | foreach-object { $a = $_.fullname; ( Get-Content -Raw $a -Encoding UTF8) | foreach-object { $_ -replace '<TargetFrameworkVersion>v4\.\d\.\d</TargetFrameworkVersion>','<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>' } | set-content -NoNewLine $a -Encoding UTF8} | |
gci -r -include "web.config" | foreach-object { $a = $_.fullname; ( Get-Content -Raw $a -Encoding UTF8) | foreach-object { $_ -replace '<compilation debug="true" targetFramework="4.6.1"','<compilation debug="true" targetFramework="4.8"' } | set-content -NoNewLine $a -Encoding UTF8} |
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
"modules": { | |
"value": { | |
"items": [ | |
{ | |
"name": "ps", | |
"templateLink": "https://yourdomain.com/ps-arm/<version>/azuredeploy.json", | |
"parameters": { | |
"templateLinkAccessToken": "Optional access token for the template if stored in Azure storage. Otherwise should be empty string.", | |
"psMsDeployPackageUrl": "<URL of the WDP file Sitecore Publishing Service *-x64.wdp.zip>", | |
"psModuleMsDeployPackageUrl": "<URL of the WDP file Sitecore Publishing Module *.scwdp.zip>" |