Last active
February 5, 2022 09:37
-
-
Save froop/ffd670b6df01f2d85862122424cd361c to your computer and use it in GitHub Desktop.
[Windows] EC2のAMI "Microsoft Windows Server 2016/2019 Base" を初期設定
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[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