Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.42 KB

windows.md

File metadata and controls

39 lines (27 loc) · 1.42 KB

windows

on aws ec2

rdp pki on aws

user data scripts

  • can't use Start-BitsTransfer in an user data script, because Start-BitsTransfer doesn't wait for the network connection to come up.

    • have to use Invoke-WebRequest or System.Net.Webclient (faster) instead.
  • for some reason, powershell user data scripts have to get wrapped in tags (bash scripts do not). example:

    <powershell>
    Write-Host "why?"
    </powershell>

enable natural scrolling

# has to be done for each mouse while it's connected.
Get-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device` Parameters FlipFlopWheel -EA 0 | ForEach-Object { Set-ItemProperty $_.PSPath FlipFlopWheel 1 }

remap caps lock to control

# may need to be done for each keyboard while it's connected.
$hexified = "00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00".Split(',') | % { "0x$_"};

$kbLayout = 'HKLM:\System\CurrentControlSet\Control\Keyboard Layout';

New-ItemProperty -Path $kbLayout -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$hexified);