Skip to content

Instantly share code, notes, and snippets.

View likamrat's full-sized avatar

Lior Kamrat likamrat

View GitHub Profile
@likamrat
likamrat / Disable_EdgeWelcome.ps1
Last active January 26, 2024 10:48
Disable Microsoft Edge first-run Welcome screen
# Set variables to indicate value and key to set
$RegistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Edge'
$Name = 'HideFirstRunExperience'
$Value = '00000001'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath)) {
New-Item -Path $RegistryPath -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force
@likamrat
likamrat / Disable_EdgeSideBar.ps1
Created February 16, 2023 18:01
Disable Microsoft Edge Sidebar
# Set variables to indicate value and key to set
$RegistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Edge'
$Name = 'HubsSidebarEnabled'
$Value = '00000000'
# Create the key if it does not exist
If (-NOT (Test-Path $RegistryPath)) {
New-Item -Path $RegistryPath -Force | Out-Null
}
# Now set the value
New-ItemProperty -Path $RegistryPath -Name $Name -Value $Value -PropertyType DWORD -Force
@likamrat
likamrat / WinGet_WinSrv.ps1
Created February 13, 2023 00:41
Installing Winget om Windows Server 2019/2022
Write-Information "This script needs be run on Windows Server 2019 or 2022"
If ($PSVersionTable.PSVersion.Major -ge 7){ Write-Error "This script needs be run by version of PowerShell prior to 7.0" }
# Define environment variables
$downloadDir = "C:\WinGet"
$gitRepo = "microsoft/winget-cli"
$msiFilenamePattern = "*.msixbundle"
$licenseFilenamePattern = "*.xml"
$releasesUri = "https://api.github.com/repos/$gitRepo/releases/latest"
@likamrat
likamrat / Terminal_WinSrv.ps1
Last active October 25, 2023 06:04
Install Windows Terminal on Windows Server
Write-Information "This script needs be run on Windows Server 2019 or 2022"
If ($PSVersionTable.PSVersion.Major -ge 7){ Write-Error "This script needs be run by version of PowerShell prior to 7.0" }
# Define environment variables
$downloadDir = "C:\WinTerminal"
$gitRepo = "microsoft/terminal"
$filenamePattern = "*.msixbundle"
$framworkPkgUrl = "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx"
$framworkPkgPath = "$downloadDir\Microsoft.VCLibs.x64.14.00.Desktop.appx"
$msiPath = "$downloadDir\Microsoft.WindowsTerminal.msixbundle"
$SourceResourceGroupName = "Heaven"
$DestinationResourceGroupName = "Hell"
$DestinationSubscriptionId = "Hell Subscription Id"
$NumMachines = 2
$AzureArcMachine = Get-AzResource -ResourceGroupName $SourceResourceGroupName -ResourceType Microsoft.HybridCompute/machines | Select-Object -First $NumMachines
ForEach-Object {
$AzureArcMachine | ForEach-Object {
Move-AzResource -DestinationSubscriptionId $DestinationSubscriptionId -DestinationResourceGroupName $DestinationResourceGroupName -ResourceId $AzureArcMachine.ResourceId -Confirm:$false -Force
$SourceResourceGroupName = "Heaven"
$DestinationResourceGroupName = "Hell"
$NumMachines = 1
$AzureArcMachine = Get-AzResource -ResourceGroupName $SourceResourceGroupName -ResourceType Microsoft.HybridCompute/machines | Select-Object -First $NumMachines
ForEach-Object {
$AzureArcMachine | ForEach-Object {
Move-AzResource -DestinationResourceGroupName $DestinationResourceGroupName -ResourceId $AzureArcMachine.ResourceId -Confirm:$false -Force
}
// ==UserScript==
// @name Streamyard Keyboard Shortcuts
// @namespace http://streamyard.com
// @version 1.0
// @description Keyboard shortcuts for streamyard
// @author Lior Kamrat
// @match https://streamyard.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
apiVersion: apps/v1
kind: Deployment
metadata:
name: mydrive-user-deployment
namespace: api
labels:
deploy: mydrive-user
spec:
replicas: 2
selector:
apiVersion: apps/v1
kind: Deployment
metadata:
name: trip-deployment
namespace: api
labels:
deploy: trips
spec:
replicas: 2
selector:
apiVersion: apps/v1
kind: Deployment
metadata:
name: user-java-deployment
namespace: api
labels:
deploy: user-java
spec:
replicas: 2
selector: