Skip to content

Instantly share code, notes, and snippets.

View Sjark's full-sized avatar

Lasse Meland Sjark

View GitHub Profile
@Sjark
Sjark / Windows 10 English with Norwegian keyboard.ps1
Created April 6, 2021 11:40 — forked from ScribbleGhost/Windows 10 English with Norwegian keyboard.ps1
Keep Windows 10 display language English but set all regional settings to Norwegian including keyboard input
# Set WinUserLanguageList as a variable
$lang = Get-WinUserLanguageList
# Clear the WinUserLanguageList
$lang.Clear()
# Add language to the language list
$lang.add("en-US")
# Remove whatever input method is present
$lang[0].InputMethodTips.Clear()
# Add this keyboard as keyboard language
$lang[0].InputMethodTips.Add('0409:00000414')
@Sjark
Sjark / gist:dcb3575eca3720f6f7101ca7e67dc39e
Created March 28, 2019 17:18 — forked from gpduck/gist:6546064
Start a process and manipulate stdin in PowerShell
try {
$MyProcess = New-Object System.Diagnostics.Process
$MyProcess.StartInfo.FileName = "c:\MyProcess.exe"
$MyProcess.StartInfo.Arguments = "arguments for process"
$MyProcess.StartInfo.UseShellExecute = $false
$MyProcess.StartInfo.RedirectStandardInput = $true
$MyProcess.Start()
$StdIn = $MyProcess.StandardInput