Posted at

PowerShellでWindowsの初期設定をする

More than 1 year has passed since last update.

windows server 2012 r2 用のメモ。

増量予定。

$winTemp = "C:\Windows\Temp"

$lpurl = "http://fg.v4.download.windowsupdate.com/d/msdownload/update/software/updt/2013/09"
$lpfile = "lp_3d6c75e45f3247f9f94721ea8fa1283392d36ea2.cab"
$languagePackURI = "$lpurl/$lpfile"
Start-BitsTransfer -Source $languagePackURI -Destination $winTemp
Add-WindowsPackage -Online -PackagePath (Join-Path $wintemp $lpfile -Resolve)
Set-ItemProperty 'registry::HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters' -Name 'LayerDriver JPN' -Value 'kbd106.dll'
Restart-Computer

Set-WinUILanguageOverride ja-JP
Set-WinHomeLocation 122
Set-WinSystemLocale ja-JP
tzutil /s "Tokyo Standard Time"
Restart-Computer


参考

AWS や Azure の英語UI をPowerShellで日本語UIにする - tech.guitarrapc.cóm - http://tech.guitarrapc.com/entry/2014/01/15/073820

Windows の TimeZone 設定をコマンドラインから行う - tech.guitarrapc.cóm - http://tech.guitarrapc.com/entry/2017/06/20/033946