Skip to content

Instantly share code, notes, and snippets.

View shurick81's full-sized avatar

Aleksandr Sapozhkov shurick81

View GitHub Profile
@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
@shurick81
shurick81 / windows.ps1
Last active February 19, 2025 07:31
Laptop provisioning
# Baseline
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module PnP.PowerShell -Force
Install-Module MSOnline -Force
Install-Module AzureAD -Force
Set-ExecutionPolicy Bypass -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# Connection and security
choco install -y forticlientvpn
Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All
Start-Transcript c:\Enable-IPRouter.log;
Set-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters -Name IpEnableRouter -Value 1;
shutdown /r /t 60
Start-Transcript c:\Enable-WebServer.log;
Install-WindowsFeature -Name Web-Server;
Start-Transcript c:\Enable-DemoDNSFeature.log;
Install-WindowsFeature -Name DNS;
Set-NetFirewallRule -Name DNSSrv-DNS-TCP-In -Enabled True;
Set-NetFirewallRule -Name DNSSrv-DNS-UDP-In -Enabled True;
Add-DnsServerPrimaryZone -Name "west02.contoso.com" -ZoneFile "west02.contoso.com.dns"
Add-DnsServerResourceRecordA -ZoneName "west02.contoso.com" -Name test -IPv4Address 10.0.0.1
Start-Transcript c:\Enable-NetFirewallICMPRule.log;
Set-NetFirewallRule -Name FPS-ICMP4-ERQ-In -Enabled True;
@shurick81
shurick81 / azuredeploy.json
Created May 1, 2020 21:53
az-300-2VMs-2RSVs
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"variables": {
"storageAccountName": "[uniquestring(resourceGroup().id)]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2018-11-01",
> [email protected] install C:\projects\sp-dev-fx-extensions\samples\js-application-appinsights\node_modules\deasync
> node ./build.js
`win32-x64-node-12` exists; testing
Binary is fine; exiting
> [email protected] install C:\projects\sp-dev-fx-extensions\samples\js-application-appinsights\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.9.3/win32-x64-72_binding.node