Win Server2k12

From neil.tappsville.com
Revision as of 08:46, 12 August 2019 by Gonzo (talk | contribs) (Created page with "===Setting NTP=== [https://social.technet.microsoft.com/Forums/windowsserver/en-US/1d70134c-045e-4d57-9ea0-f91f2da28c03/server-2012-ntp-setup?forum=winserver8setup social.tech...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Setting NTP

social.technet.microsoft.com/Forums/windowsserver/en-US/1d70134c-045e-4d57-9ea0-f91f2da28c03/server-2012-ntp-setup?forum=winserver8setup


  • Powershell as Admin
w32tm /config /manualpeerlist:[IP] /syncfromflags:MANUAL
32tm /config /reliable:yes
Stop-Service w32time
Start-Service w32time
w32tm /query /configuration
w32tm /query / status
  • command prompt - test connection with us.pool.ntp.org
w32tm /stripchart /computer:us.pool.ntp.org /dataonly /samples:5

Change Network Name and Type

serverfault.com/questions/639088/how-do-i-make-a-connection-private-on-windows-server-2012-r2

gpedit.msc
Computer Configuration/Windows Settings/Security Setting /Network List Manager Policies
right-click Network List Manager Policies in the left pane and choose Show All Networks


Applications as services

nssm.cc/ NSSM - run a exe / bat etc as a service - also monitors the process and will restart it should it die. a bit nicer than cygserv

Delete old files

forfiles -p "C:\something\something" -s -m *.* /D -<age_in_days> /C "cmd /c del @path"

Nuke every users Recycle Bin

rd /s c:\$Recycle.Bin

DNS Server binding to too many UDP Ports

By Default the DNS Server binds to 2500 UDP ports from 49152 upwards.

netsh int ipv4 show dynamicport udp
netsh int ipv6 show dynamicport udp
netsh int ipv4 set dynamicport udp start=51100 num=10000
netsh int ipv6 set dynamicport udp start=51100 num=10000
dnscmd /Config /SocketPoolSize 500
net stop dns
net start dns