Skip to content

Instantly share code, notes, and snippets.

@froop
Last active February 5, 2022 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save froop/ffd670b6df01f2d85862122424cd361c to your computer and use it in GitHub Desktop.
Save froop/ffd670b6df01f2d85862122424cd361c to your computer and use it in GitHub Desktop.
[Windows] EC2のAMI "Microsoft Windows Server 2016/2019 Base" を初期設定
#[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# Timezone
tzutil /s "Tokyo Standard Time"
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_DWORD /f
# ping
Get-NetFirewallRule -Name FPS-ICMP4-ERQ-In | Set-NetFirewallRule -enabled true
# WinRM
winrm quickconfig -force
winrm set winrm/config/service/auth '@{Basic="true"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config '@{MaxTimeoutms="300000"}'
# Visible hidden file and extention
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 1 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
# Rename computer name
Rename-Computer -NewName "WindowsServer" -Force
#Restart-Computer -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment