Skip to content

Instantly share code, notes, and snippets.

View shurick81's full-sized avatar

Aleksandr Sapozhkov shurick81

View GitHub Profile
@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
"C:\Program Files\VideoLAN\VLC\vlc" -vvv "https://fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/01/1528/13/332644691/1310258719.mp4?token=1569173019-0x1779c821df6e6104976e9de31209004d80b3df1e"
--sout=#transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=192,channels=2,deinterlace}:standard{access=file,mux=ts,dst=GA2.mp4}
"C:\Program Files\VideoLAN\VLC\vlc" -vvv "https://fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/01/628/13/328141500/1285947924.mp4?token=1569166655-0x3237d484ce876b2fe1d30444bd15221adacbfcd1"
--sout=#transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=192,channels=2,deinterlace}:standard{access=file,mux=ts,dst=M03Target1.mp4}
"C:\Program Files\VideoLAN\VLC\vlc" -vvv "https://fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/01/720/13/328602999/1288657711.mp4?token=1569173861-0xb03e9297c90140e2757823210ca593624df06375"
--sout=#transcode{vcodec=h264,vb=1024,acodec=mp4a,ab=192,channels=2,deinterlace}:standard{access=file,mux=ts,dst=M03Tartet2.mp4}
"C:\Program Files\VideoLAN\VLC\vlc" -vvv "https://fpdl.vimeocdn.com/vi
Add-PSSnapin Microsoft.SharePoint.PowerShell
New-SPTrustedSecurityTokenIssuer -Name "crm" -IsTrustBroker:$false -MetadataEndpoint "https://crm.contoso.local/Contoso/XrmServices/2015/metadataendpoint.svc/json?orgName=Contoso";
$CrmRealmId = Get-Content "c:\Install\CRM\OrganizationId.txt"
$Identifier = "00000007-0000-0000-c000-000000000000@" + $CrmRealmId
$site = Get-SPSite "https://crmdocuments.contoso.local"
Register-SPAppPrincipal -site $site.RootWeb -NameIdentifier $Identifier -DisplayName "crm"
$app = Get-SPAppPrincipal -NameIdentifier $Identifier -Site $site.Rootweb
Set-SPAppPrincipalPermission -AppPrincipal $app -Site $site.Rootweb -Scope "sitecollection" -Right "FullControl" -EnableAppOnlyPolicy
#New-SPClaimTypeMapping -IncomingClaimType "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming