Skip to content

Instantly share code, notes, and snippets.

View shurick81's full-sized avatar

Aleksandr Sapozhkov shurick81

View GitHub Profile
@shurick81
shurick81 / macbook_provisioning.sh
Last active April 6, 2024 08:57
Mac Provisioning
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
cd /opt/homebrew/bin/
ls
PATH=$PATH:/opt/homebrew/bin
cd
touch .zshrc
echo export PATH=$PATH:/opt/homebrew/bin -> .zshrc
brew doctor
brew install --cask keepassxc
@shurick81
shurick81 / log
Created March 13, 2023 11:42
Dynamics 365 CE On-Premises 9.1.16 New Organization Swedish
This file has been truncated, but you can view the full file.
2023-03-13 10:04:38.384| Info| Deployment Manager Start
2023-03-13 10:04:39.041|Verbose| Retrieving config database version Data Source=SWAZSRV00\SqlInstance01;Initial Catalog=MSCRM_CONFIG;Integrated Security=True;Enlist=False;Connect Timeout=30;Application Name=MSCRMmmc;Workstation ID=SWAZSRV00.mmc ...
2023-03-13 10:04:39.041| Info| Config database version: 9.1.16.20.
2023-03-13 10:04:41.043| Info| Creating table: DBUpdateInstallInfo
2023-03-13 10:04:41.059| Info| Found the older table DBUpdateInstallInfo_V5, updating new table and deleting
2023-03-13 10:04:41.059| Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 9.1.0016.0020.
2023-03-13 10:04:41.090|Verbose| Getting number of organizations Data Source=SWAZSRV00\SqlInstance01;Initial Catalog=MSCRM_CONFIG;Integrated Security=True;Enlist=False;Connect Timeout=30;Application Name=MSCRMmmc;Workstation ID=SWAZSRV00.mmc ...
2023-03-13 10:04:41.106|Verbose| Getting number of Servers Data Source=SWAZSRV00\SqlInstance01;Initial Catalog=MSCRM_CONF
@shurick81
shurick81 / DSC_SqlRS.psm1
Created March 9, 2023 16:56
SqlServerDsc 16.1.0 Adjusted 00
$script:sqlServerDscHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SqlServerDsc.Common'
$script:resourceHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\DscResource.Common'
Import-Module -Name $script:sqlServerDscHelperModulePath
Import-Module -Name $script:resourceHelperModulePath
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
<#
.SYNOPSIS
@shurick81
shurick81 / DSC_SqlRS.psm1
Created March 9, 2023 07:06
SqlServerDsc 15.2.0 Adjusted
$script:sqlServerDscHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SqlServerDsc.Common'
$script:resourceHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\DscResource.Common'
Import-Module -Name $script:sqlServerDscHelperModulePath
Import-Module -Name $script:resourceHelperModulePath
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
<#
.SYNOPSIS
@shurick81
shurick81 / DSC_SqlRS.psm1
Created March 9, 2023 06:54
SqlServerDsc 16.1.0 Adjusted
$script:sqlServerDscHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\SqlServerDsc.Common'
$script:resourceHelperModulePath = Join-Path -Path $PSScriptRoot -ChildPath '..\..\Modules\DscResource.Common'
Import-Module -Name $script:sqlServerDscHelperModulePath
Import-Module -Name $script:resourceHelperModulePath
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
<#
.SYNOPSIS
@shurick81
shurick81 / windows.ps1
Created June 1, 2022 21:47
Virtual Desktop Provisioning
# Run in PS with elevated privileges
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install -y googlechrome
choco install -y git
choco install -y vscode
choco install -y docker-engine
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux", "VirtualMachinePlatform" -NoRestart
Invoke-WebRequest -Uri https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi -OutFile wsl_update_x64.msi -UseBasicParsing
Start-Process msiexec.exe -Wait -ArgumentList "/I $((Get-Location).Path)\wsl_update_x64.msi /quiet"
# Reboot the machine before you continue
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="EndpointAuth:Audience" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-asy-loc" />
<add key="EndpointAuth:Tenant" value="crmbtsjobstest.onmicrosoft.com" />
<add key="KeyVault:VaultUrl" value="https://crm-bts-asy-loc.vault.azure.net" />
<add key="TestEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-goldfish" />
<add key="ProdEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-hyx-can" />
<add key="ProdEndpoint:EndpointUri" value="https://can.hyx.crmbts.net" />
</appSettings>
@shurick81
shurick81 / 9.0.24 updated to 9.1.3.xml
Created August 19, 2021 09:27
Dynamics 9.1.3 updated C:\Program Files\Dynamics 365\Server\bin\CrmAsyncService.exe.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="EndpointAuth:Audience" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-asy-loc" />
<add key="EndpointAuth:Tenant" value="crmbtsjobstest.onmicrosoft.com" />
<add key="KeyVault:VaultUrl" value="https://crm-bts-asy-loc.vault.azure.net" />
<add key="TestEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-goldfish" />
<add key="ProdEndpoint:AudienceUri" value="https://crmbtsjobstest.onmicrosoft.com/crm-bts-hyx-can" />
<add key="ProdEndpoint:EndpointUri" value="https://can.hyx.crmbts.net" />
</appSettings>
@shurick81
shurick81 / sts-cert.ps1
Created May 4, 2021 08:50
CRM STS certificate
$certPassword = "xxxx";
$hostName = "crmsigning.contoso.local";
$pfxPass = ConvertTo-SecureString $certPassword -AsPlainText -Force;
# For Windows Server 2012
$name = new-object -com "X509Enrollment.CX500DistinguishedName.1"
$name.Encode("CN=$hostName", 0)
$key = new-object -com "X509Enrollment.CX509PrivateKey.1"
$key.ProviderName = "Microsoft RSA SChannel Cryptographic Provider"
14:57:13| Info| Deployment Manager Start
14:57:14|Verbose| Retrieving config database version Data Source=swazdb00\SQLInstance01;Initial Catalog=MSCRM_CONFIG;Integrated Security=True;Enlist=False;Connect Timeout=30;Application Name=MSCRMmmc;Workstation ID=SWAZSERVER00.mmc ...
14:57:14| Info| Config database version: 9.1.1.149.
14:57:17| Info| Found the older table DBUpdateInstallInfo_V5, updating new table and deleting
14:57:17| Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 9.1.0001.0149.
14:57:17|Verbose| Getting number of organizations Data Source=swazdb00\SQLInstance01;Initial Catalog=MSCRM_CONFIG;Integrated Security=True;Enlist=False;Connect Timeout=30;Application Name=MSCRMmmc;Workstation ID=SWAZSERVER00.mmc ...
14:57:17|Verbose| Getting number of Servers Data Source=swazdb00\SQLInstance01;Initial Catalog=MSCRM_CONFIG;Integrated Security=True;Enlist=False;Connect Timeout=30;Application Name=MSCRMmmc;Workstation ID=SWAZSERVER00.mmc ...
14:57:17|Verbose| Getting number of organizations