-
Set the timezone
tzutil /s "Eastern Standard Time"
-
Enable automatic updates:
cscript \windows\system32\scregedit.wsf /AU 4
-
Enable Remote Desktop:
cscript \windows\system32\scregedit.wsf /AR 1
-
Install PowerShell:
dism /online /enable-feature /featurename:NetFx2-ServerCore dism /online /enable-feature /featurename:MicrosoftWindowsPowerShell dism /online /enable-feature /featurename:ServerManager-PSH-Cmdlets
-
Set PowerShell execution policy
C:\>powershell PS C:\> Set-ExecutionPolicy RemoteSigned
-
Install updates:
cscript \windows\system32\en-us\wuasearchdownloadinstall.vbs
-
Install and activate license key:
slmgr /ipk <license key> slmgr /ato
PS>$wc=new-object system.net.webclient
PS>$wc.downloadfile("your_url","your_file")
See the system.net.webclient documentation for more information.
Use the -q
flag to run Cygwin's setup.exe in batch mode.
setup.exe -q -n -P openssh git curl vim
Run ssh-host-config -y
for initial sshd configuration.
Opening up a port for ssh:
netsh advfirewall firewall add rule name=SSH protocol=TCP dir=in localport=22 action=allow
Show all firewall rules:
netsh advfirewall firewall show rule name=all