Win Server2k12
From neil.tappsville.com
Jump to navigationJump to search
Contents
Setting NTP
- 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