
บทนำ: ทำไม Windows Server ถึงยังสำคัญในยุค Cloud?
แม้ว่ายุคนี้จะเป็นยุคของ Cloud Computing แต่ Windows Server ยังคงเป็นหัวใจของโครงสร้าง IT ในองค์กรส่วนใหญ่ทั่วโลก — ตั้งแต่ SMB ไปจนถึง enterprise ขนาดใหญ่ Active Directory, File Server, DNS, DHCP, Hyper-V, Remote Desktop Services และอีกมากมาย ล้วนทำงานอยู่บน Windows Server ทั้งสิ้น
ในเดือนพฤศจิกายน 2024 Microsoft ได้เปิดตัว Windows Server 2025 ซึ่งเป็นเวอร์ชันใหม่ล่าสุดที่มาพร้อม feature ใหม่มากมาย — ตั้งแต่ storage improvements, Hotpatch support, advanced Active Directory features ไปจนถึง Azure integration ที่แน่นขึ้น บทความนี้จะเป็น คู่มือฉบับสมบูรณ์ สำหรับ IT Admin ที่ต้องการเรียนรู้ทุกอย่างเกี่ยวกับ Windows Server 2025 ตั้งแต่เริ่มต้นจนถึงระดับ production
เนื้อหาครอบคลุม: What’s New ใน Windows Server 2025, เปรียบเทียบ editions, hardware requirements, การติดตั้งแบบ step-by-step ทั้ง Desktop Experience และ Server Core, initial configuration, Active Directory installation, DNS/DHCP roles, File Server (SMB shares/DFS), Hyper-V, Windows Admin Center, Group Policy, Windows Update management, security hardening ตามมาตรฐาน CIS, Windows Firewall with Advanced Security, Remote Desktop Services, Backup, PowerShell management, licensing และ migration strategy
ส่วนที่ 1: What’s New ใน Windows Server 2025
1.1 Major Features และ Improvements
Windows Server 2025 ถือเป็น Long-Term Servicing Channel (LTSC) release ที่มาแทน Windows Server 2022 โดยมี support lifecycle 10 ปี (5 ปี mainstream + 5 ปี extended) ซึ่งเหมาะกับ production environment ที่ต้องการความเสถียร:
Windows Server 2025 — What's New:
Storage Improvements:
├── NVMe Performance:
│ ├── ปรับปรุง NVMe stack ทั้งหมด
│ ├── ลด latency ลง 40-60% เทียบกับ Server 2022
│ ├── เพิ่ม throughput สำหรับ NVMe-oF (NVMe over Fabrics)
│ └── รองรับ NVMe multipath ดีขึ้น
├── Storage Spaces Direct (S2D) Improvements:
│ ├── Native NVMe support ที่ดีขึ้น
│ ├── Storage thin provisioning improvements
│ ├── Faster rebuild times สำหรับ failed drives
│ └── ReFS improvements สำหรับ performance/reliability
├── SMB over QUIC:
│ ├── SMB file access ผ่าน QUIC protocol
│ ├── ไม่ต้องใช้ VPN สำหรับ remote file access
│ ├── ทำงานผ่าน internet ได้โดยตรง
│ ├── Encrypted by default (TLS 1.3)
│ └── ดีสำหรับ remote/hybrid workers
├── SMB Compression:
│ ├── On-the-wire compression สำหรับ SMB traffic
│ ├── ลด bandwidth ใช้ 50-70%
│ └── Transparent — ไม่ต้องเปลี่ยน application
Active Directory Improvements:
├── AD Functional Level 2025:
│ ├── ใหม่ล่าสุด — ต้อง upgrade DC ทั้งหมดก่อน
│ ├── 32K database page size (จากเดิม 8K)
│ │ ├── เพิ่ม performance ของ AD database
│ │ ├── รองรับ multi-valued attributes ขนาดใหญ่
│ │ └── ลด I/O operations
│ ├── Improved LDAP performance
│ └── Better replication efficiency
├── Credential Guard by Default:
│ ├── เปิดโดย default ใน Server 2025
│ ├── ป้องกัน credential theft (Pass-the-Hash)
│ ├── ใช้ virtualization-based security (VBS)
│ └── ไม่ต้อง configure เพิ่ม
Security Enhancements:
├── Hotpatch Support:
│ ├── ติดตั้ง security patches ไม่ต้อง reboot
│ ├── ลด downtime จากการ patch 95%+
│ ├── ต้องใช้ Azure Arc connection
│ └── Available สำหรับ Datacenter: Azure Edition
├── HTTPS Boot:
│ ├── PXE boot over HTTPS
│ ├── Secure network boot
│ └── ไม่ต้องใช้ TFTP (insecure)
├── TLS 1.3 Enabled by Default:
│ ├── Modern encryption standard
│ ├── Faster handshakes
│ └── Better security
├── Secured-Core Server:
│ ├── Hardware root-of-trust
│ ├── Firmware protection
│ ├── Virtualization-based security
│ └── Advanced threat protection
└── Windows Defender Application Control (WDAC):
├── Application whitelisting
├── Code integrity policies
└── ป้องกัน unauthorized software
Networking:
├── Accelerated Networking:
│ ├── Network performance improvements 20-30%
│ ├── Better SR-IOV support
│ └── Lower CPU utilization สำหรับ network I/O
├── Multi-subnet Failover Cluster:
│ ├── Better stretch cluster support
│ ├── Improved heartbeat detection
│ └── Faster failover across subnets
Hyper-V Improvements:
├── GPU Partitioning (GPU-P):
│ ├── แบ่ง physical GPU ให้หลาย VMs
│ ├── รองรับ AI/ML workloads ใน VMs
│ └── ดีกว่า GPU passthrough เดิม
├── Improved Live Migration:
│ ├── Faster live migration
│ ├── ใช้ compression ดีขึ้น
│ └── Less downtime during migration
└── Nested Virtualization Improvements:
├── Better performance
└── รองรับ more scenarios
Azure Integration:
├── Azure Arc Integration:
│ ├── Manage on-prem servers จาก Azure Portal
│ ├── Azure Policy enforcement
│ ├── Azure Monitor integration
│ └── Azure Update Management
├── Azure Edition Features:
│ ├── Hotpatch (patch without reboot)
│ ├── SMB over QUIC
│ ├── Extended networking
│ └── Azure-only features
└── Hybrid Cloud Ready:
├── Azure Site Recovery integration
├── Azure Backup integration
└── Azure File Sync
1.2 Support Lifecycle
Windows Server 2025 มี lifecycle support ที่ยาวนานตามมาตรฐาน LTSC:
Windows Server Support Lifecycle:
Windows Server 2025 (LTSC):
├── Release Date: November 2024
├── Mainstream Support End: ~November 2029
├── Extended Support End: ~November 2034
└── Total Support: 10 years
เปรียบเทียบ versions ที่ยังได้รับ support:
├── Server 2016: Extended support จบ January 2027
│ └── ⚠ ควรเริ่มวาง migration plan
├── Server 2019: Extended support จบ January 2029
│ └── ยังมีเวลา แต่ควร plan
├── Server 2022: Extended support จบ October 2031
│ └── ปัจจุบันยัง OK
└── Server 2025: Extended support จบ ~November 2034
└── ✅ Latest and greatest
ส่วนที่ 2: เปรียบเทียบ Editions — Standard vs Datacenter vs Azure Edition
2.1 Edition Comparison
Windows Server 2025 มี 3 editions หลัก แต่ละ edition เหมาะกับ use case ที่แตกต่างกัน — การเลือกผิด edition อาจทำให้เสียค่า license โดยไม่จำเป็น หรือขาด feature ที่ต้องการ:
Windows Server 2025 Editions:
┌─────────────────────────┬────────────┬────────────────┬───────────────────┐
│ Feature │ Standard │ Datacenter │ Datacenter Azure │
├─────────────────────────┼────────────┼────────────────┼───────────────────┤
│ Core OS Features │ ✅ Full │ ✅ Full │ ✅ Full │
│ Active Directory │ ✅ │ ✅ │ ✅ │
│ DNS / DHCP │ ✅ │ ✅ │ ✅ │
│ File Server / DFS │ ✅ │ ✅ │ ✅ │
│ Hyper-V │ ✅ │ ✅ │ ✅ │
│ Failover Clustering │ ✅ │ ✅ │ ✅ │
│ Storage Replica │ Limited │ ✅ Full │ ✅ Full │
│ Storage Spaces Direct │ ❌ │ ✅ │ ✅ │
│ Shielded VMs │ ❌ │ ✅ │ ✅ │
│ Software-Defined Net │ ❌ │ ✅ │ ✅ │
│ VM Licensing │ 2 VMs │ Unlimited VMs │ Unlimited VMs │
│ Hotpatch │ ❌ │ ❌ │ ✅ │
│ SMB over QUIC │ ✅ │ ✅ │ ✅ │
│ Azure Arc Required │ Optional │ Optional │ Required │
│ Extended Networking │ ❌ │ ❌ │ ✅ │
│ ราคา (Retail) │ ~$1,069 │ ~$6,155 │ Azure-only │
└─────────────────────────┴────────────┴────────────────┴───────────────────┘
Edition Selection Guide:
├── Standard:
│ ├── เหมาะกับ: Physical server หรือ light virtualization (≤2 VMs)
│ ├── Use case: File server, print server, AD DC, DNS, DHCP
│ ├── ราคา: ถูกที่สุด
│ └── จำกัด: 2 Hyper-V VMs per license
│
├── Datacenter:
│ ├── เหมาะกับ: Highly virtualized environments
│ ├── Use case: Hyper-V host, HCI, S2D, SDN
│ ├── ราคา: แพงกว่า Standard ~6x
│ ├── คุ้ม: เมื่อ run VMs > 2 ตัว per host
│ └── ได้ unlimited VMs + advanced features
│
└── Datacenter: Azure Edition:
├── เหมาะกับ: Hybrid cloud ที่ integrate กับ Azure
├── Use case: Azure Stack HCI, Azure Arc managed
├── Exclusive features: Hotpatch, Extended Networking
└── ต้อง connect กับ Azure เสมอ
2.2 Licensing Model
Windows Server 2025 ใช้ core-based licensing ซึ่งคิดตามจำนวน physical cores ของ CPU — ไม่ใช่ตามจำนวน CPU หรือ VM:
Licensing Model — Windows Server 2025:
Core-Based Licensing:
├── ขาย: เป็น 2-core packs
├── ขั้นต่ำต่อ server: 16 cores (8 packs)
├── ขั้นต่ำต่อ CPU: 8 cores (4 packs)
├── ตัวอย่าง:
│ ├── Server มี 1 CPU, 8 cores → ต้องซื้อ 16-core license (minimum)
│ ├── Server มี 1 CPU, 16 cores → ต้องซื้อ 16-core license
│ ├── Server มี 1 CPU, 24 cores → ต้องซื้อ 24-core license
│ ├── Server มี 2 CPUs, 16 cores each (32 total) → ต้องซื้อ 32-core license
│ └── Server มี 2 CPUs, 32 cores each (64 total) → ต้องซื้อ 64-core license
│
├── Standard Edition Pricing (ตัวอย่าง):
│ ├── 16-core license pack: ~$1,069 (retail)
│ ├── 2-core additional pack: ~$120
│ ├── สำหรับ 32-core server: ~$1,069 + (8 × $120) = ~$2,029
│ └── Volume License: ถูกกว่า retail 30-50%
│
└── CAL (Client Access License):
├── ต้องซื้อ CAL สำหรับทุก user/device ที่เข้าถึง
├── User CAL: ~$44/user (เหมาะ: user 1 คน ใช้หลาย device)
├── Device CAL: ~$44/device (เหมาะ: device 1 ตัว ใช้หลาย user)
├── RDS CAL: เพิ่มเติม สำหรับ Remote Desktop Services
└── External Connector License: สำหรับ external users (unlimited)
Cost Comparison (ตัวอย่าง 1 server, 32 cores, 50 users):
├── Standard: $2,029 (OS) + 50 × $44 (CAL) = ~$4,229
├── Datacenter: $12,310 (OS) + 50 × $44 (CAL) = ~$14,510
└── ถ้า run 10 VMs:
├── Standard: ต้องซื้อ 5 licenses (2 VMs per license) = ~$21,145
└── Datacenter: 1 license (unlimited VMs) = ~$14,510 ← คุ้มกว่า!
ส่วนที่ 3: Hardware Requirements และ Pre-Installation Planning
3.1 System Requirements
ก่อนติดตั้ง Windows Server 2025 ต้องตรวจสอบ hardware requirements ให้ผ่านก่อน — requirements เพิ่มขึ้นจาก Server 2022 เล็กน้อย:
Windows Server 2025 Hardware Requirements:
Minimum Requirements:
├── CPU:
│ ├── 1.4 GHz 64-bit processor
│ ├── x64-compatible architecture
│ ├── รองรับ NX/XD bit
│ ├── รองรับ CMPXCHG16b, LAHF/SAHF, PrefetchW
│ ├── รองรับ SLAT (Second Level Address Translation)
│ │ ├── Intel: EPT (Extended Page Tables)
│ │ └── AMD: RVI (Rapid Virtualization Indexing)
│ └── ⚠ ไม่รองรับ 32-bit (x86) แล้ว
├── RAM:
│ ├── Minimum: 512 MB (Server Core)
│ ├── Minimum: 2 GB (Desktop Experience)
│ ├── ECC RAM (Error Correcting) recommended
│ └── Maximum: 48 TB
├── Storage:
│ ├── Minimum: 32 GB
│ ├── ⚠ เครื่องที่มี RAM > 16 GB ต้องการ disk มากกว่า
│ ├── SATA 6 Gbps ขึ้นไป หรือ SAS/NVMe
│ └── DVD drive สำหรับ physical installation
├── Network:
│ ├── Ethernet adapter ≥ 1 Gbps throughput
│ ├── PXE-capable recommended
│ └── Additional NICs สำหรับ NIC teaming/failover
├── UEFI:
│ ├── UEFI 2.3.1c firmware required
│ ├── Secure Boot capable
│ └── TPM 2.0 recommended (required for some features)
└── Other:
├── Trusted Platform Module (TPM) 2.0
├── Super VGA (1024 × 768) or higher-resolution monitor
└── Keyboard and mouse (or compatible input device)
Recommended Specifications (Production):
├── Small Office (10-50 users):
│ ├── CPU: Intel Xeon E-2400 series (4-8 cores)
│ ├── RAM: 32-64 GB ECC
│ ├── Storage: 2× SSD 480GB RAID 1 (OS) + RAID 5/10 สำหรับ data
│ ├── NIC: 2× 1Gbps (teaming)
│ └── ตัวอย่าง: Dell PowerEdge T350, HPE ML110 Gen11
├── Medium Office (50-200 users):
│ ├── CPU: Intel Xeon Silver 4400 (16-24 cores)
│ ├── RAM: 64-128 GB ECC
│ ├── Storage: 2× SSD 960GB RAID 1 (OS) + SAS/NVMe RAID 5/10
│ ├── NIC: 2× 10Gbps + 2× 1Gbps (management)
│ └── ตัวอย่าง: Dell PowerEdge R660, HPE DL360 Gen11
└── Enterprise / Hyper-V Host (200+ users):
├── CPU: 2× Intel Xeon Gold 5400/6400 (32-64 cores total)
├── RAM: 256-512 GB ECC
├── Storage: NVMe RAID (OS) + SAN/NAS สำหรับ VMs
├── NIC: 2× 25Gbps + 2× 10Gbps
└── ตัวอย่าง: Dell PowerEdge R760, HPE DL380 Gen11
3.2 Pre-Installation Checklist
ก่อนเริ่มติดตั้ง ให้ทำ checklist ต่อไปนี้เพื่อป้องกันปัญหาที่อาจเกิดขึ้น:
Pre-Installation Checklist:
☐ Hardware Preparation:
├── ☐ ตรวจสอบ hardware compatibility กับ Windows Server Catalog
├── ☐ Update BIOS/UEFI firmware ล่าสุด
├── ☐ Update RAID controller firmware
├── ☐ Configure RAID array ก่อนติดตั้ง OS
├── ☐ Enable Secure Boot ใน BIOS
├── ☐ Enable TPM 2.0 ใน BIOS
├── ☐ Set boot mode เป็น UEFI (ไม่ใช่ Legacy)
└── ☐ Verify NIC firmware version
☐ Network Planning:
├── ☐ กำหนด hostname (ตาม naming convention)
├── ☐ กำหนด IP address, subnet mask, default gateway
├── ☐ กำหนด DNS server addresses
├── ☐ กำหนด VLAN (ถ้ามี)
├── ☐ Plan NIC teaming (active-standby or LACP)
└── ☐ Firewall rules ที่ต้อง open
☐ Active Directory Planning (ถ้าเป็น DC):
├── ☐ Domain name (FQDN): เช่น corp.company.co.th
├── ☐ NetBIOS name: เช่น CORP
├── ☐ Forest/Domain functional level
├── ☐ DSRM password (จำให้ได้!)
├── ☐ Sites and Subnets design
└── ☐ DNS zone strategy
☐ Software & Media:
├── ☐ Download Windows Server 2025 ISO จาก Microsoft Volume Licensing
├── ☐ สร้าง bootable USB (Rufus) หรือ mount ISO ผ่าน iLO/iDRAC
├── ☐ Product key พร้อม
├── ☐ Driver pack สำหรับ server model (NIC, Storage Controller)
└── ☐ Windows Admin Center installer
ส่วนที่ 4: การติดตั้ง Windows Server 2025 — Step-by-Step
4.1 Desktop Experience vs Server Core
Windows Server 2025 มีสอง installation options ที่สำคัญที่ต้องเลือกตอนติดตั้ง — เปลี่ยนภายหลังได้ยาก:
Installation Options:
Desktop Experience (GUI):
├── มี Windows GUI เหมือน Windows 11
├── มี Server Manager, MMC snap-ins
├── มี Event Viewer, Task Manager, etc.
├── ใช้ disk space มากกว่า (~10-12 GB)
├── ต้อง patch มากกว่า (attack surface ใหญ่กว่า)
├── เหมาะกับ:
│ ├── ผู้เริ่มต้น / IT Admin ที่คุ้นเคย GUI
│ ├── Server ที่ต้องรัน GUI apps
│ ├── RDS Session Host
│ └── Development/Test environment
└── ข้อเสีย: ใช้ RAM/CPU มากกว่า, attack surface ใหญ่
Server Core (No GUI):
├── ไม่มี GUI — CLI only (PowerShell + cmd)
├── มี sconfig tool สำหรับ basic config
├── ใช้ disk space น้อยกว่า (~6-8 GB)
├── Patches น้อยกว่า → reboot น้อยกว่า
├── Attack surface เล็กกว่า → secure กว่า
├── เหมาะกับ:
│ ├── Domain Controllers
│ ├── DNS/DHCP servers
│ ├── File Servers
│ ├── Hyper-V hosts
│ └── Production servers ทั่วไป
├── Manage ผ่าน:
│ ├── Remote: Windows Admin Center (WAC)
│ ├── Remote: RSAT tools จาก workstation
│ ├── Remote: PowerShell remoting
│ └── Local: sconfig, PowerShell
└── Best Practice: ใช้ Server Core เมื่อเป็นไปได้
4.2 Installation Steps (Desktop Experience)
ขั้นตอนติดตั้ง Windows Server 2025 แบบ Desktop Experience อย่างละเอียด:
Installation Walkthrough:
Step 1 — Boot from Media:
├── ใส่ USB / Mount ISO ผ่าน iLO/iDRAC
├── Boot from USB/DVD
├── ⚠ ถ้า boot ไม่ขึ้น: ตรวจ UEFI boot order
└── จอ "Windows Setup" จะปรากฏ
Step 2 — Language & Region:
├── Language to install: English (United States) ← recommended
├── Time and currency format: Thai (Thailand) หรือ English
├── Keyboard: Thai Kedmanee หรือ US
└── Click "Next" → "Install now"
Step 3 — Product Key:
├── ใส่ product key (25 ตัวอักษร)
├── หรือ "I don't have a product key" (evaluation 180 วัน)
└── Click "Next"
Step 4 — Select Edition:
├── Windows Server 2025 Standard (Desktop Experience)
├── Windows Server 2025 Standard (Server Core)
├── Windows Server 2025 Datacenter (Desktop Experience)
├── Windows Server 2025 Datacenter (Server Core)
├── เลือก edition ที่มี license
└── Click "Next"
Step 5 — License Agreement:
├── อ่าน (หรือไม่อ่าน) license terms
├── Check "I accept the Microsoft Software License Terms"
└── Click "Next"
Step 6 — Installation Type:
├── "Upgrade": upgrade จาก version เดิม (ไม่แนะนำ)
├── "Custom: Install Windows only (advanced)" ← เลือกอันนี้
└── ⚠ Custom = clean install, ข้อมูลเก่าจะถูกลบ
Step 7 — Disk Selection:
├── เลือก disk/partition ที่ต้องการติดตั้ง
├── ถ้า disk ไม่ขึ้น:
│ ├── Load driver → browse ไปที่ storage controller driver
│ ├── เช่น Dell PERC, HPE SmartArray driver
│ └── Driver ต้องเป็น .inf format
├── "New" เพื่อสร้าง partition ใหม่
├── ⚠ จะสร้าง 4 partitions:
│ ├── Recovery (500 MB)
│ ├── EFI System (100 MB)
│ ├── MSR (16 MB)
│ └── Primary (ที่เหลือทั้งหมด)
└── Click "Next" → Installation begins
Step 8 — Wait:
├── การติดตั้งใช้เวลา 15-30 นาที
├── Server จะ reboot 2-3 ครั้ง
├── ⚠ อย่าถอด USB ก่อนเสร็จ
└── จนกว่าจะเห็นหน้า "Customize settings"
Step 9 — Set Administrator Password:
├── กำหนด password สำหรับ local Administrator
├── ⚠ Password Requirements:
│ ├── อย่างน้อย 14 ตัวอักษร (recommended)
│ ├── uppercase + lowercase + number + symbol
│ └── อย่าใช้ password ที่เดาง่าย
├── จด password ไว้ในที่ปลอดภัย (password manager)
└── Click "Finish"
Step 10 — First Login:
├── Ctrl+Alt+Del (หรือ Ctrl+Alt+End ถ้า remote)
├── Login ด้วย Administrator + password ที่ตั้ง
├── Server Manager จะเปิดขึ้นอัตโนมัติ
└── ✅ Installation Complete!
ส่วนที่ 5: Initial Configuration — ตั้งค่าเบื้องต้นหลังติดตั้ง
5.1 Essential Post-Installation Tasks
หลังจากติดตั้ง Windows Server 2025 เสร็จแล้ว ต้องทำการ configure เบื้องต้นก่อนนำไปใช้งาน — ขั้นตอนนี้สำคัญมาก เพราะถ้าตั้งค่าผิดตั้งแต่ต้น จะแก้ยากภายหลัง:
Post-Installation Configuration:
1. Set Computer Name (Hostname):
# PowerShell
Rename-Computer -NewName "SRV-DC01" -Restart
# หรือผ่าน Server Manager → Local Server → Computer Name
Naming Convention ที่ดี:
├── Format: [SITE]-[ROLE][##]
├── ตัวอย่าง:
│ ├── BKK-DC01 (Bangkok Domain Controller 1)
│ ├── BKK-DC02 (Bangkok Domain Controller 2)
│ ├── BKK-FS01 (Bangkok File Server 1)
│ ├── BKK-HV01 (Bangkok Hyper-V Host 1)
│ ├── CNX-DC01 (Chiang Mai Domain Controller 1)
│ └── HQ-APP01 (HQ Application Server 1)
├── ❌ หลีกเลี่ยง: SERVER1, TEST, ชื่อคน
└── ⚠ Max 15 characters (NetBIOS limit)
2. Configure Static IP Address:
# PowerShell
# ดู adapter ทั้งหมด
Get-NetAdapter
# Set static IP
New-NetIPAddress -InterfaceAlias "Ethernet0" `
-IPAddress 192.168.1.10 `
-PrefixLength 24 `
-DefaultGateway 192.168.1.1
# Set DNS
Set-DnsClientServerAddress -InterfaceAlias "Ethernet0" `
-ServerAddresses 192.168.1.10, 192.168.1.11
# Verify
Get-NetIPConfiguration
3. Configure Time Zone:
# PowerShell
Set-TimeZone -Id "SE Asia Standard Time" # UTC+7 Thailand
# ⚠ Time sync สำคัญมากสำหรับ AD — ต่างกันเกิน 5 นาที = authentication fail
# Set NTP source
w32tm /config /manualpeerlist:"time.windows.com,0x9" /syncfromflags:manual /reliable:YES /update
Restart-Service w32time
w32tm /resync
4. Windows Update:
# ติดตั้ง updates ทั้งหมด
# PowerShell
Install-Module PSWindowsUpdate -Force
Get-WindowsUpdate
Install-WindowsUpdate -AcceptAll -AutoReboot
5. Enable Remote Desktop:
# PowerShell
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' `
-Name "fDenyTSConnections" -Value 0
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
6. Configure NIC Teaming (ถ้ามีหลาย NIC):
# PowerShell
New-NetLbfoTeam -Name "Team1" `
-TeamMembers "Ethernet0","Ethernet1" `
-TeamingMode SwitchIndependent `
-LoadBalancingAlgorithm Dynamic
5.2 Join Domain หรือ Promote เป็น Domain Controller
สำหรับ server ที่ต้องเข้าร่วม domain ที่มีอยู่แล้ว หรือจะเป็น Domain Controller ตัวใหม่:
Join Existing Domain:
# PowerShell
Add-Computer -DomainName "corp.company.co.th" `
-Credential (Get-Credential) `
-Restart
# หรือผ่าน Server Manager → Local Server → Workgroup → Change
Promote to Domain Controller (New Forest):
# ดูในส่วนที่ 6 (Active Directory Installation)
ส่วนที่ 6: Active Directory Domain Services (AD DS) Installation
6.1 ติดตั้ง AD DS Role
Active Directory เป็นหัวใจของ Windows Server environment — ทำหน้าที่ authentication, authorization, และ centralized management สำหรับ users, computers, และ resources ทั้งหมดในองค์กร:
Active Directory Installation:
Method 1 — PowerShell (Recommended):
# Step 1: Install AD DS role
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
# Step 2: Promote to DC (New Forest)
Install-ADDSForest `
-DomainName "corp.company.co.th" `
-DomainNetbiosName "CORP" `
-ForestMode "WinThreshold" `
-DomainMode "WinThreshold" `
-InstallDns:$true `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-LogPath "C:\Windows\NTDS" `
-SysvolPath "C:\Windows\SYSVOL" `
-SafeModeAdministratorPassword (ConvertTo-SecureString "P@ssw0rd!Complex2026" -AsPlainText -Force) `
-Force:$true
# Server จะ reboot อัตโนมัติ
Method 2 — Server Manager (GUI):
├── Server Manager → Add Roles and Features
├── Role-based or feature-based installation
├── Select server
├── Select "Active Directory Domain Services"
├── Add required features → Next → Next → Install
├── After install: Click "Promote this server to DC"
├── Deployment Configuration:
│ ├── "Add a new forest" (ถ้าเป็น DC ตัวแรก)
│ ├── Root domain name: corp.company.co.th
│ └── Next
├── Domain Controller Options:
│ ├── Forest functional level: Windows Server 2025
│ ├── Domain functional level: Windows Server 2025
│ ├── ☐ DNS server (check)
│ ├── ☐ Global Catalog (check)
│ ├── DSRM password: [ตั้ง password ที่ซับซ้อน]
│ └── Next
├── DNS Options: Next (ignore delegation warning)
├── Additional Options: NetBIOS name จะ auto-fill
├── Paths: ค่า default OK (หรือเปลี่ยนไป drive อื่น)
├── Review Options → Next
├── Prerequisites Check → Install
└── Server จะ reboot → Login ด้วย CORP\Administrator
Adding Additional DC (Redundancy):
# บน server ตัวที่ 2
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-ADDSDomainController `
-DomainName "corp.company.co.th" `
-Credential (Get-Credential) `
-InstallDns:$true `
-DatabasePath "C:\Windows\NTDS" `
-LogPath "C:\Windows\NTDS" `
-SysvolPath "C:\Windows\SYSVOL" `
-SafeModeAdministratorPassword (ConvertTo-SecureString "P@ssw0rd!Complex2026" -AsPlainText -Force) `
-Force:$true
⚠ Best Practice:
├── ต้องมี DC อย่างน้อย 2 ตัวเสมอ (redundancy)
├── DC ควรเป็น dedicated role (ไม่ควร run apps อื่น)
├── DSRM password ต้องจำได้ (ใช้ recovery AD)
├── DNS ควร install บน DC ทุกตัว
├── Time sync ต้องถูกต้อง (PDC Emulator sync NTP)
└── SYSVOL replication ต้อง healthy
6.2 Basic AD Management
หลังจากติดตั้ง AD DS เสร็จ สิ่งแรกที่ต้องทำคือสร้าง OU structure, users, และ groups:
AD Management Basics:
Create OU Structure:
# PowerShell
New-ADOrganizationalUnit -Name "Company" -Path "DC=corp,DC=company,DC=co,DC=th"
New-ADOrganizationalUnit -Name "Users" -Path "OU=Company,DC=corp,DC=company,DC=co,DC=th"
New-ADOrganizationalUnit -Name "Computers" -Path "OU=Company,DC=corp,DC=company,DC=co,DC=th"
New-ADOrganizationalUnit -Name "Servers" -Path "OU=Company,DC=corp,DC=company,DC=co,DC=th"
New-ADOrganizationalUnit -Name "Groups" -Path "OU=Company,DC=corp,DC=company,DC=co,DC=th"
New-ADOrganizationalUnit -Name "Service Accounts" -Path "OU=Company,DC=corp,DC=company,DC=co,DC=th"
OU Structure Example:
corp.company.co.th
├── Company
│ ├── Users
│ │ ├── Bangkok
│ │ ├── ChiangMai
│ │ └── Phuket
│ ├── Computers
│ │ ├── Desktops
│ │ ├── Laptops
│ │ └── Kiosks
│ ├── Servers
│ │ ├── Production
│ │ ├── Development
│ │ └── Test
│ ├── Groups
│ │ ├── Security Groups
│ │ └── Distribution Groups
│ └── Service Accounts
Create User:
# PowerShell
New-ADUser -Name "สมชาย ดีมาก" `
-GivenName "สมชาย" `
-Surname "ดีมาก" `
-SamAccountName "somchai.d" `
-UserPrincipalName "[email protected]" `
-Path "OU=Bangkok,OU=Users,OU=Company,DC=corp,DC=company,DC=co,DC=th" `
-AccountPassword (ConvertTo-SecureString "TempP@ss123!" -AsPlainText -Force) `
-ChangePasswordAtLogon $true `
-Enabled $true
# Bulk Create Users จาก CSV:
Import-Csv "C:\Users.csv" | ForEach-Object {
New-ADUser -Name $_.Name `
-SamAccountName $_.Username `
-UserPrincipalName "$($_.Username)@corp.company.co.th" `
-Path $_.OU `
-AccountPassword (ConvertTo-SecureString $_.Password -AsPlainText -Force) `
-Enabled $true
}
Create Security Group:
New-ADGroup -Name "IT-Department" `
-GroupScope Global `
-GroupCategory Security `
-Path "OU=Groups,OU=Company,DC=corp,DC=company,DC=co,DC=th" `
-Description "สมาชิกแผนก IT"
# Add member to group
Add-ADGroupMember -Identity "IT-Department" -Members "somchai.d"
ส่วนที่ 7: DNS และ DHCP Server Role
7.1 DNS Server Configuration
DNS เป็น role ที่สำคัญที่สุดสำหรับ Active Directory — ถ้า DNS มีปัญหา AD ทั้งหมดจะมีปัญหาตามไปด้วย:
DNS Server Configuration:
DNS ถูกติดตั้งอัตโนมัติเมื่อ promote DC:
├── Forward Lookup Zone: corp.company.co.th (AD-integrated)
├── Reverse Lookup Zone: ต้องสร้างเอง
└── Forwarders: ต้อง configure เอง
Create Reverse Lookup Zone:
# PowerShell
Add-DnsServerPrimaryZone -NetworkID "192.168.1.0/24" `
-ReplicationScope "Forest" `
-DynamicUpdate "Secure"
Configure DNS Forwarders:
# สำหรับ resolve internet domains
Set-DnsServerForwarder -IPAddress "8.8.8.8","1.1.1.1","208.67.222.222"
# Verify
Get-DnsServerForwarder
DNS Best Practices:
├── ทุก DC ควรเป็น DNS server
├── DNS client ของ DC ควร point ไปที่ตัวเอง (127.0.0.1) เป็น secondary
├── DNS client ของ DC ควร point ไปที่ DC อีกตัวเป็น primary
│ ├── DC1 DNS: DC2-IP, 127.0.0.1
│ └── DC2 DNS: DC1-IP, 127.0.0.1
├── สร้าง Reverse Lookup Zone เสมอ
├── Enable DNS Scavenging (ลบ stale records)
│ └── Set-DnsServerScavenging -ScavengingState $true -ScavengingInterval 7.00:00:00
├── ใช้ Conditional Forwarders สำหรับ partner domains
└── Monitor DNS query log
7.2 DHCP Server Setup
DHCP Server แจก IP addresses อัตโนมัติให้กับ clients ในเครือข่าย — ช่วยลดงาน manual configuration:
DHCP Server Installation:
# Install DHCP role
Install-WindowsFeature DHCP -IncludeManagementTools
# Authorize DHCP in AD (จำเป็นสำหรับ domain environment)
Add-DhcpServerInDC -DnsName "SRV-DC01.corp.company.co.th" -IPAddress 192.168.1.10
# Create Scope
Add-DhcpServerv4Scope -Name "Office-LAN" `
-StartRange 192.168.1.100 `
-EndRange 192.168.1.250 `
-SubnetMask 255.255.255.0 `
-LeaseDuration 8:00:00:00 `
-State Active
# Set Scope Options
Set-DhcpServerv4OptionValue -ScopeId 192.168.1.0 `
-DnsServer 192.168.1.10, 192.168.1.11 `
-DnsDomain "corp.company.co.th" `
-Router 192.168.1.1
# Add Exclusion (สำหรับ static IPs)
Add-DhcpServerv4ExclusionRange -ScopeId 192.168.1.0 `
-StartRange 192.168.1.1 -EndRange 192.168.1.99
# Add Reservation (จอง IP สำหรับ printer/device)
Add-DhcpServerv4Reservation -ScopeId 192.168.1.0 `
-IPAddress 192.168.1.50 `
-ClientId "AA-BB-CC-DD-EE-FF" `
-Name "Printer-Floor1"
# DHCP Failover (High Availability)
Add-DhcpServerv4Failover -ComputerName "SRV-DC01" `
-PartnerServer "SRV-DC02" `
-Name "DHCP-Failover" `
-ScopeId 192.168.1.0 `
-SharedSecret "SecretKey123!" `
-LoadBalancePercent 50
DHCP Best Practices:
├── ใช้ DHCP Failover เสมอ (HA)
├── Lease duration: 8 ชม. สำหรับ WiFi, 8 วัน สำหรับ LAN
├── Exclude: server IPs, printer IPs, network equipment IPs
├── Enable DHCP audit logging
├── Backup DHCP configuration regularly
│ └── Backup-DhcpServer -Path "C:\DHCP-Backup"
└── Monitor: scope utilization > 80% = expand
ส่วนที่ 8: File Server — SMB Shares และ DFS
8.1 File Server Role
File Server เป็น role ที่ใช้บ่อยที่สุดใน Windows Server — แชร์ไฟล์ให้ users ในองค์กรเข้าถึงได้:
File Server Setup:
# Install File Server role
Install-WindowsFeature FS-FileServer, FS-DFS-Namespace, FS-DFS-Replication -IncludeManagementTools
# Create shared folder
New-Item -Path "D:\SharedData" -ItemType Directory
New-Item -Path "D:\SharedData\Department" -ItemType Directory
New-Item -Path "D:\SharedData\Public" -ItemType Directory
New-Item -Path "D:\SharedData\IT" -ItemType Directory
# Create SMB Share with permissions
New-SmbShare -Name "SharedData" `
-Path "D:\SharedData" `
-FullAccess "CORP\Domain Admins" `
-ChangeAccess "CORP\Domain Users" `
-ReadAccess "CORP\Domain Guests" `
-Description "Company Shared Data"
# Set NTFS Permissions (ละเอียดกว่า Share Permissions)
$acl = Get-Acl "D:\SharedData\IT"
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule(
"CORP\IT-Department", "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow")
$acl.AddAccessRule($rule)
Set-Acl "D:\SharedData\IT" $acl
# Enable Access-Based Enumeration (ซ่อน folder ที่ไม่มีสิทธิ์)
Set-SmbShare -Name "SharedData" -FolderEnumerationMode AccessBased
File Server Best Practices:
├── ใช้ NTFS permissions เป็นหลัก (ไม่ใช่ share permissions)
├── Share permissions: Everyone = Change, ใช้ NTFS คุม
├── Enable Access-Based Enumeration (ABE)
├── ใช้ Security Groups (ไม่ใช่ individual users) สำหรับ permissions
├── File Screen: บล็อกไฟล์ที่ไม่ต้องการ (.exe, .mp3, .torrent)
├── Quota: จำกัด disk usage per folder/user
├── Enable Shadow Copies (Previous Versions)
│ └── vssadmin create shadow /for=D:
├── Drive mapping ผ่าน GPO
│ └── User Config → Preferences → Drive Maps
└── Audit: enable file access auditing สำหรับ compliance
8.2 DFS (Distributed File System)
DFS ทำให้ users เข้าถึงไฟล์จาก multiple servers ผ่าน single namespace และ replicate ข้อมูลระหว่าง sites:
DFS Namespace and Replication:
Create DFS Namespace:
# Standalone namespace
New-DfsnRoot -TargetPath "\\SRV-DC01\SharedData" `
-Type Standalone -Path "\\corp.company.co.th\Files"
# Domain-based namespace (recommended)
New-DfsnRoot -TargetPath "\\SRV-DC01\SharedData" `
-Type DomainV2 -Path "\\corp.company.co.th\Files"
# Add folder targets
New-DfsnFolder -Path "\\corp.company.co.th\Files\Department" `
-TargetPath "\\SRV-DC01\Department"
# Users จะเข้าถึงผ่าน:
# \\corp.company.co.th\Files\Department
# แทนที่จะต้องจำ server name
DFS Replication (ถ้ามี 2 sites):
├── Replicate ข้อมูลระหว่าง servers
├── Users ที่แต่ละ site เข้าถึง local copy
├── ลด WAN bandwidth usage
├── Automatic failover ถ้า server ตาย
└── ใช้สำหรับ SYSVOL replication ด้วย (AD)
ส่วนที่ 9: Hyper-V Role — Virtualization
9.1 Hyper-V Installation และ Configuration
Hyper-V เป็น hypervisor ที่มาพร้อมกับ Windows Server — ทำให้สามารถ run virtual machines ได้บน physical server เดียว:
Hyper-V Setup:
# Install Hyper-V role
Install-WindowsFeature Hyper-V -IncludeManagementTools -Restart
# Configure VM storage paths
Set-VMHost -VirtualHardDiskPath "D:\Hyper-V\Virtual Hard Disks"
Set-VMHost -VirtualMachinePath "D:\Hyper-V\Virtual Machines"
# Create Virtual Switch
# External (bridged to physical NIC)
New-VMSwitch -Name "External-vSwitch" `
-NetAdapterName "Ethernet0" `
-AllowManagementOS $true
# Internal (host + VMs only)
New-VMSwitch -Name "Internal-vSwitch" -SwitchType Internal
# Create VM
New-VM -Name "SRV-APP01" `
-MemoryStartupBytes 4GB `
-NewVHDPath "D:\Hyper-V\Virtual Hard Disks\SRV-APP01.vhdx" `
-NewVHDSizeBytes 100GB `
-Generation 2 `
-SwitchName "External-vSwitch"
# Configure VM
Set-VM -Name "SRV-APP01" `
-ProcessorCount 4 `
-DynamicMemory `
-MemoryMinimumBytes 2GB `
-MemoryMaximumBytes 8GB `
-AutomaticStartAction Start `
-AutomaticStopAction ShutDown
# Enable Secure Boot for Linux
Set-VMFirmware -VMName "SRV-APP01" `
-SecureBootTemplate MicrosoftUEFICertificateAuthority
# Add DVD drive with ISO
Add-VMDvdDrive -VMName "SRV-APP01" -Path "C:\ISO\WinServer2025.iso"
# Start VM
Start-VM -Name "SRV-APP01"
Hyper-V Best Practices (Server 2025):
├── ใช้ Generation 2 VMs เสมอ (UEFI, Secure Boot)
├── ใช้ VHDX (ไม่ใช่ VHD) — รองรับ 64TB, resilient
├── Dynamic Memory: ประหยัด RAM แต่ set max ให้เหมาะสม
├── VM storage แยก drive จาก OS (D: หรือ E:)
├── Enable checkpoints เฉพาะ test environment
│ └── Production: ปิด checkpoints (performance impact)
├── ใช้ NIC teaming บน host สำหรับ HA
├── GPU-P (GPU Partitioning) สำหรับ AI/ML VMs ← ใหม่ใน 2025
├── Live Migration สำหรับ zero-downtime maintenance
├── Replica สำหรับ DR (replicate VM ไป site อื่น)
└── Monitor: RAM/CPU usage, disk I/O per VM
ส่วนที่ 10: Windows Admin Center (WAC)
10.1 ติดตั้งและใช้งาน Windows Admin Center
Windows Admin Center เป็น web-based management tool ที่ Microsoft พัฒนาขึ้นมาแทน Server Manager — ใช้ manage servers, clusters, HCI จากที่เดียว ผ่าน web browser:
Windows Admin Center (WAC):
WAC Overview:
├── Web-based (HTML5) — ไม่ต้องติดตั้ง client
├── Manage: Windows Server, Windows 10/11, Clusters, Azure
├── Free — มาพร้อม Windows Server license
├── Replace: Server Manager, MMC, RSAT (บางส่วน)
├── Features:
│ ├── Server overview (CPU, RAM, Disk, Network)
│ ├── Certificates management
│ ├── Devices (hardware)
│ ├── Events (Event Viewer)
│ ├── Files (file browser)
│ ├── Firewall rules
│ ├── Installed apps
│ ├── Local users and groups
│ ├── Network settings
│ ├── PowerShell console
│ ├── Processes (Task Manager)
│ ├── Registry editor
│ ├── Remote Desktop
│ ├── Roles and Features
│ ├── Scheduled Tasks
│ ├── Services
│ ├── Storage
│ ├── Updates
│ ├── Virtual Machines (Hyper-V)
│ └── Virtual Switches
└── Extensions: Azure Backup, Azure Monitor, etc.
Installation:
├── Download จาก Microsoft (WAC latest version)
├── Install on:
│ ├── Option A: Dedicated management server (recommended)
│ │ └── Access: https://wac-server.corp.company.co.th:443
│ ├── Option B: บน managed server เอง (ไม่แนะนำ production)
│ │ └── Access: https://server-name:6516
│ └── Option C: Windows 10/11 workstation
├── Requirements:
│ ├── TLS 1.2+
│ ├── Port 443 หรือ 6516
│ ├── WinRM enabled on managed servers
│ └── Modern browser (Edge, Chrome, Firefox)
# After install เปิด browser:
# https://wac-server:443
# Add servers ที่ต้องการ manage
# ใช้ AD credentials สำหรับ authentication
ส่วนที่ 11: Group Policy Basics
11.1 Group Policy Overview และ Best Practices
Group Policy เป็นเครื่องมือที่ทรงพลังที่สุดใน Active Directory — ใช้ควบคุม configuration ของ users และ computers ทั้งหมดในองค์กร จากจุดเดียว:
Group Policy Management:
สร้างและจัดการ GPO:
# Install GPMC (Group Policy Management Console)
Install-WindowsFeature GPMC
# สร้าง GPO ใหม่
New-GPO -Name "Security-Baseline" -Comment "Company security baseline"
# Link GPO ไปที่ OU
New-GPLink -Name "Security-Baseline" `
-Target "OU=Company,DC=corp,DC=company,DC=co,DC=th"
# View all GPOs
Get-GPO -All | Select DisplayName, GpoStatus, CreationTime
Common GPO Settings:
Password Policy:
├── Computer Config → Windows Settings → Security Settings
│ → Account Policies → Password Policy
├── Minimum password length: 14 characters
├── Password complexity: Enabled
├── Maximum password age: 90 days
├── Minimum password age: 1 day
├── Password history: 24 passwords
└── ⚠ Password policy ต้อง link ที่ domain level เท่านั้น
Account Lockout:
├── Account lockout threshold: 5 invalid attempts
├── Account lockout duration: 30 minutes
├── Reset lockout counter after: 30 minutes
└── ป้องกัน brute force attacks
Windows Update (WSUS):
├── Computer Config → Admin Templates → Windows Components
│ → Windows Update → Manage updates from WSUS
├── Set WSUS server address
├── Configure auto-update schedule
└── Automatic download and schedule install
Drive Mapping:
├── User Config → Preferences → Windows Settings → Drive Maps
├── Action: Create
├── Location: \\corp.company.co.th\Files
├── Drive letter: H:
├── Label: "Shared Drive"
└── ใช้ Item-Level Targeting สำหรับ different departments
Desktop Restrictions:
├── Remove access to Control Panel
├── Prevent access to registry editing tools
├── Remove Run from Start Menu
├── Disable USB storage devices
└── ใช้สำหรับ kiosk/shared computers
GPO Processing Order (LSDOU):
├── L = Local Policy (lowest priority)
├── S = Site Policy
├── D = Domain Policy
├── O = OU Policy
├── U = Child OU Policy (highest priority)
├── ⚠ "Last applied wins" — policy ที่ apply ทีหลังจะ override
└── Block Inheritance / Enforce ใช้ override order นี้ได้
ส่วนที่ 12: Windows Update Management
12.1 WSUS และ Update Strategy
การจัดการ Windows Update ในองค์กรต้องมีระบบ — ไม่ควรปล่อยให้แต่ละเครื่อง update เอง เพราะอาจทำให้ production server reboot โดยไม่คาดคิด:
Windows Update Management Strategy:
Option 1 — WSUS (Windows Server Update Services):
├── ฟรี — มาพร้อม Windows Server
├── Install WSUS role:
│ Install-WindowsFeature UpdateServices -IncludeManagementTools
├── ข้อดี:
│ ├── ควบคุม updates ที่จะ deploy
│ ├── Test updates ก่อน deploy production
│ ├── ประหยัด bandwidth (download ครั้งเดียว)
│ ├── Reporting — ดูว่าเครื่องไหนยัง patch ไม่ครบ
│ └── ฟรี ไม่มีค่า license
├── ข้อเสีย:
│ ├── ต้องดูแลเอง
│ ├── UI ค่อนข้าง outdated
│ ├── ไม่มี third-party patch support
│ └── Cleanup ต้องทำเอง
└── Workflow:
├── Microsoft → WSUS Server → Approve → Deploy
├── Computer Groups:
│ ├── Pilot (10% เครื่อง — test ก่อน)
│ ├── Production-Servers (deploy หลัง pilot 1 week)
│ ├── Workstations (deploy หลัง servers)
│ └── Maintenance Window: Tue/Wed night (after Patch Tuesday)
└── Approve process:
├── Patch Tuesday (2nd Tuesday): Microsoft release patches
├── Day 1-2: Review patches, test ใน lab
├── Day 3-7: Deploy to Pilot group
├── Day 8-14: Monitor Pilot, ถ้า OK → approve Production
└── Day 15+: Deploy to workstations
Option 2 — Azure Update Management:
├── Cloud-based update management
├── ใช้ Azure Arc เชื่อมต่อ on-prem servers
├── ข้อดี:
│ ├── Dashboard ใน Azure Portal
│ ├── Maintenance windows
│ ├── Pre/Post scripts
│ ├── Linux support ด้วย
│ └── Integration กับ Azure Monitor
├── ข้อเสีย:
│ ├── ต้องมี Azure subscription
│ ├── ค่าใช้จ่าย Azure Arc (อาจ free tier ได้)
│ └── ต้อง outbound internet access
└── เหมาะกับ hybrid cloud environment
Hotpatch (Server 2025 Azure Edition):
├── ติดตั้ง security patches ไม่ต้อง reboot
├── ลด downtime จากการ patching 95%+
├── Available เฉพาะ Datacenter: Azure Edition
├── ต้องใช้ Azure Arc connection
└── ทุกๆ 3 เดือนยังต้อง reboot 1 ครั้ง (cumulative update)
ส่วนที่ 13: Security Hardening — CIS Benchmarks
13.1 Windows Server Security Best Practices
การ harden Windows Server ให้ปลอดภัยเป็นสิ่งจำเป็น โดยเฉพาะ servers ที่ expose ต่อ internet หรืออยู่ใน regulated industry ใช้ CIS (Center for Internet Security) Benchmarks เป็นมาตรฐาน:
Security Hardening Checklist:
Account Security:
├── ☐ Rename local Administrator account
│ └── Rename-LocalUser -Name "Administrator" -NewName "SrvAdmin"
├── ☐ Disable Guest account
│ └── Disable-LocalUser -Name "Guest"
├── ☐ ใช้ Group Managed Service Accounts (gMSA) สำหรับ services
│ └── ดีกว่า regular service accounts — password rotate อัตโนมัติ
├── ☐ Enable account lockout policy (5 attempts, 30 min)
├── ☐ Password length ≥ 14 characters
├── ☐ Enable MFA สำหรับ admin accounts (Azure MFA / Duo)
├── ☐ ใช้ Privileged Access Workstations (PAWs) สำหรับ admin tasks
└── ☐ Implement tiered admin model (Tier 0/1/2)
Network Security:
├── ☐ Disable SMBv1
│ └── Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
├── ☐ Enable SMB signing
│ └── Set-SmbServerConfiguration -RequireSecuritySignature $true
├── ☐ Enable SMB encryption (SMBv3)
│ └── Set-SmbServerConfiguration -EncryptData $true
├── ☐ Disable unnecessary network protocols (NetBIOS, LLMNR)
├── ☐ Enable Windows Firewall on all profiles
├── ☐ NLA (Network Level Authentication) สำหรับ RDP
├── ☐ Disable TLS 1.0/1.1 — ใช้ TLS 1.2/1.3 เท่านั้น
└── ☐ IPsec สำหรับ server-to-server communication
Audit & Logging:
├── ☐ Enable Advanced Audit Policy
│ ├── Logon/Logoff events
│ ├── Account Management
│ ├── Object Access (file/folder)
│ ├── Policy Change
│ ├── Privilege Use
│ └── System events
├── ☐ Increase Security log size (≥ 1 GB)
│ └── wevtutil sl Security /ms:1073741824
├── ☐ Forward logs to SIEM (Splunk, ELK, Azure Sentinel)
├── ☐ Enable PowerShell Script Block Logging
│ └── Computer Config → Admin Templates → Windows PowerShell
├── ☐ Enable PowerShell Transcription
└── ☐ Monitor for suspicious activities
Software Restriction:
├── ☐ Enable Windows Defender Application Control (WDAC)
├── ☐ AppLocker policies สำหรับ application whitelisting
├── ☐ Disable unnecessary Windows features
│ └── Remove features ที่ไม่ใช้: Print Server, Fax, etc.
├── ☐ Block macro execution in Office (ผ่าน GPO)
├── ☐ Enable Controlled Folder Access (Ransomware protection)
└── ☐ ใช้ LAPS (Local Administrator Password Solution)
└── Randomize local admin password per computer
Credential Protection (Windows Server 2025):
├── ☐ Credential Guard (enabled by default ใน 2025)
│ └── ป้องกัน Pass-the-Hash, Pass-the-Ticket attacks
├── ☐ Remote Credential Guard สำหรับ RDP
│ └── ป้องกัน credential ถูกขโมยจาก remote session
├── ☐ LSASS protection (RunAsPPL)
│ └── ป้องกัน credential dumping tools
└── ☐ Protected Users group สำหรับ privileged accounts
ส่วนที่ 14: Windows Firewall with Advanced Security
14.1 Windows Firewall Configuration
Windows Firewall with Advanced Security (WFAS) เป็น host-based firewall ที่ทรงพลัง — ไม่ควรปิด แม้จะมี network firewall อยู่แล้ว (defense in depth):
Windows Firewall Management:
# ดูสถานะ
Get-NetFirewallProfile | Select Name, Enabled, DefaultInboundAction, DefaultOutboundAction
# Enable all profiles
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
# Set default deny inbound
Set-NetFirewallProfile -Profile Domain,Public,Private `
-DefaultInboundAction Block `
-DefaultOutboundAction Allow
# Allow specific service
New-NetFirewallRule -DisplayName "Allow SQL Server" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 1433 `
-Action Allow `
-Profile Domain
# Allow RDP from specific subnet only
New-NetFirewallRule -DisplayName "Allow RDP from Admin VLAN" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 3389 `
-Action Allow `
-RemoteAddress 10.0.99.0/24 `
-Profile Domain
# Block all RDP from other sources
New-NetFirewallRule -DisplayName "Block RDP Others" `
-Direction Inbound `
-Protocol TCP `
-LocalPort 3389 `
-Action Block `
-Profile Domain,Public,Private
# Enable logging
Set-NetFirewallProfile -Profile Domain `
-LogFileName "%systemroot%\system32\LogFiles\Firewall\pfirewall.log" `
-LogMaxSizeKilobytes 32767 `
-LogAllowed True `
-LogBlocked True
# Deploy firewall rules via GPO:
# Computer Config → Windows Settings → Security Settings
# → Windows Defender Firewall with Advanced Security
# → Inbound Rules / Outbound Rules
Essential Ports for Windows Server:
├── DNS: TCP/UDP 53
├── DHCP: UDP 67/68
├── Kerberos: TCP/UDP 88
├── LDAP: TCP/UDP 389, TCP 636 (LDAPS)
├── SMB: TCP 445
├── RPC: TCP 135 + dynamic (49152-65535)
├── AD Replication: TCP/UDP 389, 636, 3268, 3269
├── WinRM/WAC: TCP 5985 (HTTP), 5986 (HTTPS)
├── RDP: TCP 3389 (⚠ จำกัด source IP)
└── HTTPS: TCP 443
ส่วนที่ 15: Remote Desktop Services (RDS)
15.1 RDS Overview และ Configuration
Remote Desktop Services ช่วยให้ users หลายคน login เข้า server พร้อมกัน — ใช้สำหรับ remote work, application delivery, หรือ VDI:
Remote Desktop Services:
RDS Components:
├── RD Session Host: server ที่ users login เข้าไปใช้งาน
├── RD Connection Broker: จัดการ connections, load balancing
├── RD Web Access: web portal สำหรับ launch RemoteApps
├── RD Gateway: secure access จาก internet (HTTPS)
├── RD Licensing: จัดการ RDS CALs
└── RD Virtualization Host: VDI (virtual desktop)
Simple RDS Setup (Session-Based Desktop):
# Install RDS role
Install-WindowsFeature RDS-RD-Server -IncludeManagementTools -Restart
# Configure licensing
Install-WindowsFeature RDS-Licensing, RDS-Licensing-UI
# Set licensing mode
$obj = Get-WmiObject -Namespace "Root\cimv2\TerminalServices" `
-Class Win32_TerminalServiceSetting
$obj.ChangeMode(2) # 2 = Per Device, 4 = Per User
# Add RDS CAL packs
# ⚠ ต้องซื้อ RDS CAL แยกจาก Windows Server CAL
RDS Licensing:
├── RDS CAL ≠ Windows Server CAL (ต้องซื้อแยก)
├── Per User RDS CAL: ~$158/user
├── Per Device RDS CAL: ~$120/device
├── ⚠ ต้องซื้อสำหรับทุก user/device ที่ใช้ RDS
├── 120-day grace period (ไม่มี CAL)
└── Volume License: ถูกกว่า retail
RDS Security:
├── ☐ Enable NLA (Network Level Authentication)
├── ☐ ใช้ RD Gateway สำหรับ external access (ไม่ expose 3389)
├── ☐ TLS 1.2+ สำหรับ RDP connections
├── ☐ Set idle/disconnected session timeouts
├── ☐ ใช้ certificate จาก trusted CA (ไม่ใช่ self-signed)
├── ☐ Group Policy: restrict drive redirection, clipboard, etc.
└── ☐ MFA สำหรับ RDS access (Azure MFA / Duo)
ส่วนที่ 16: Windows Server Backup
16.1 Backup Strategy
Backup เป็นสิ่งที่ขาดไม่ได้ — ถ้า server พัง, ถูก ransomware, หรือข้อมูลถูกลบโดยบังเอิญ backup เป็นทางรอดเดียว:
Windows Server Backup:
# Install Windows Server Backup feature
Install-WindowsFeature Windows-Server-Backup
# Full Server Backup (PowerShell)
$policy = New-WBPolicy
$volume = Get-WBVolume -AllVolumes | Where-Object { $_.MountPath -eq "C:" }
Add-WBVolume -Policy $policy -Volume $volume
# Backup to network share
$target = New-WBBackupTarget -NetworkPath "\\NAS01\Backup\SRV-DC01" `
-Credential (Get-Credential)
Add-WBBackupTarget -Policy $policy -Target $target
# Include System State (AD, registry, boot files)
Add-WBSystemState -Policy $policy
# Include Bare Metal Recovery
Add-WBBareMetalRecovery -Policy $policy
# Set schedule (daily at 2:00 AM)
Set-WBSchedule -Policy $policy -Schedule 02:00
# Apply policy
Set-WBPolicy -Policy $policy -Force
Backup Strategy (3-2-1 Rule):
├── 3 copies ของข้อมูล
├── 2 different media types
├── 1 copy offsite
├── ตัวอย่าง:
│ ├── Copy 1: Production server (primary)
│ ├── Copy 2: NAS/SAN backup (local)
│ ├── Copy 3: Cloud backup (Azure Backup / Veeam Cloud)
│ └── ทดสอบ restore ทุกเดือน!
└── Retention:
├── Daily backups: เก็บ 14 วัน
├── Weekly backups: เก็บ 4 สัปดาห์
├── Monthly backups: เก็บ 12 เดือน
└── Yearly backups: เก็บ 3-7 ปี
AD-Specific Backup:
├── System State backup ที่สำคัญที่สุดสำหรับ DC
├── ต้อง backup ภายใน AD tombstone lifetime (180 days default)
├── ใช้สำหรับ:
│ ├── Authoritative restore (recover deleted objects)
│ ├── Non-authoritative restore (rebuild failed DC)
│ └── Forest recovery (worst case scenario)
├── AD Recycle Bin (enable ไว้!):
│ └── Enable-ADOptionalFeature -Identity 'Recycle Bin Feature' `
│ -Scope ForestOrConfigurationSet `
│ -Target 'corp.company.co.th' -Confirm:$false
└── ⚠ AD Recycle Bin ≠ backup — ยังต้อง backup อยู่
ส่วนที่ 17: PowerShell Management สำหรับ IT Admin
17.1 PowerShell Commands ที่ IT Admin ต้องรู้
PowerShell เป็นเครื่องมือที่ทรงพลังที่สุดสำหรับ Windows Server management — ทุก task สามารถทำผ่าน PowerShell ได้ และยัง automate ได้ด้วย:
Essential PowerShell Commands:
Server Information:
# System info
Get-ComputerInfo | Select OsName, OsVersion, OsBuildNumber, CsName, CsTotalPhysicalMemory
Get-WmiObject Win32_Processor | Select Name, NumberOfCores, NumberOfLogicalProcessors
# Uptime
(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime
# Disk usage
Get-Volume | Select DriveLetter, FileSystemLabel, @{N='SizeGB';E={[math]::Round($_.Size/1GB,1)}}, @{N='FreeGB';E={[math]::Round($_.SizeRemaining/1GB,1)}}
# Services
Get-Service | Where-Object { $_.Status -eq 'Running' } | Sort-Object DisplayName
# Event Log (last 24h errors)
Get-EventLog -LogName System -EntryType Error -After (Get-Date).AddDays(-1)
Active Directory:
# Find locked out users
Search-ADAccount -LockedOut | Select Name, SamAccountName, LastLogonDate
# Find disabled users
Search-ADAccount -AccountDisabled | Select Name, SamAccountName
# Find users with expired password
Search-ADAccount -PasswordExpired | Select Name, SamAccountName
# Find inactive users (90+ days)
$threshold = (Get-Date).AddDays(-90)
Get-ADUser -Filter {LastLogonDate -lt $threshold -and Enabled -eq $true} `
-Properties LastLogonDate | Select Name, LastLogonDate
# AD replication status
Get-ADReplicationPartnerMetadata -Target * -Scope Server |
Select Server, Partner, LastReplicationAttempt, LastReplicationResult
# FSMO roles
Get-ADDomain | Select InfrastructureMaster, PDCEmulator, RIDMaster
Get-ADForest | Select DomainNamingMaster, SchemaMaster
Network:
# IP configuration
Get-NetIPConfiguration
Get-NetIPAddress -AddressFamily IPv4
# DNS test
Resolve-DnsName google.com
Test-Connection 8.8.8.8 -Count 4
# Port test
Test-NetConnection -ComputerName server01 -Port 3389
Automation Script Example:
# Daily health check script
$report = @()
$servers = Get-ADComputer -Filter {OperatingSystem -like "*Server*"} -Properties OperatingSystem
foreach ($server in $servers) {
$result = Test-Connection -ComputerName $server.Name -Count 1 -Quiet
$report += [PSCustomObject]@{
Server = $server.Name
OS = $server.OperatingSystem
Online = $result
Time = Get-Date
}
}
$report | Export-Csv "C:\Reports\ServerHealth_$(Get-Date -Format 'yyyyMMdd').csv" -NoTypeInformation
ส่วนที่ 18: Migration จาก Windows Server เวอร์ชันเก่า
18.1 Migration Strategy
การ migrate จาก Windows Server เวอร์ชันเก่าไปยัง 2025 ต้องวางแผนอย่างรอบคอบ — ถ้าทำผิดขั้นตอนอาจทำให้ระบบ down ได้:
Migration Planning:
Supported Upgrade Paths:
├── Server 2012 R2 → Server 2025 ← supported (in-place)
├── Server 2016 → Server 2025 ← supported (in-place)
├── Server 2019 → Server 2025 ← supported (in-place)
├── Server 2022 → Server 2025 ← supported (in-place)
├── ⚠ Server 2008/2008 R2 → ไม่ support direct upgrade
│ └── ต้อง migrate ไป 2016/2019 ก่อน แล้ว upgrade อีกที
└── ⚠ Edition upgrade: Standard → Datacenter supported
Migration Methods:
In-Place Upgrade:
├── ข้อดี: เร็ว, เก็บ settings/apps ทั้งหมด
├── ข้อเสีย: อาจมี compatibility issues, ไม่ clean
├── เหมาะกับ: servers ที่มี complex configuration
├── ขั้นตอน:
│ ├── 1. Full backup ก่อน upgrade
│ ├── 2. Check compatibility (setup.exe /compat)
│ ├── 3. Update firmware/drivers
│ ├── 4. Run setup.exe จาก mounted ISO
│ ├── 5. เลือก "Upgrade"
│ ├── 6. รอ 1-3 ชั่วโมง
│ ├── 7. Verify: services, apps, AD health
│ └── 8. Run dcdiag, repadmin หลัง upgrade
└── ⚠ ทำใน maintenance window เสมอ
Side-by-Side Migration (Recommended):
├── ข้อดี: clean install, rollback ง่าย, ไม่มี legacy issues
├── ข้อเสีย: ต้องมี hardware ใหม่ / VM ใหม่, ย้ายข้อมูล
├── เหมาะกับ: clean start, DC migration
├── ขั้นตอน:
│ ├── 1. Build server ใหม่ด้วย Server 2025
│ ├── 2. Join domain, promote เป็น DC (ถ้าเป็น DC)
│ ├── 3. รอ AD replication เสร็จ
│ ├── 4. ย้าย FSMO roles ไปที่ DC ใหม่
│ │ └── Move-ADDirectoryServerOperationMasterRole
│ ├── 5. ย้าย services/data ไป server ใหม่
│ ├── 6. Update DNS/DHCP ให้ point ไป server ใหม่
│ ├── 7. Demote DC เก่า (ถ้าเป็น DC)
│ │ └── Uninstall-ADDSDomainController -Force
│ ├── 8. Monitor 2-4 สัปดาห์
│ └── 9. Decommission server เก่า
└── ✅ Recommended approach สำหรับ production
AD Domain/Forest Functional Level Upgrade:
├── หลังจาก upgrade DC ทุกตัวเป็น Server 2025 แล้ว:
├── Set-ADDomainMode -Identity "corp.company.co.th" -DomainMode Windows2025Domain
├── Set-ADForestMode -Identity "corp.company.co.th" -ForestMode Windows2025Forest
├── ⚠ ไม่สามารถ downgrade functional level กลับได้!
├── ⚠ ต้อง upgrade DC ทุกตัวก่อน raise functional level
└── New features: 32K database page size, improved performance
ส่วนที่ 19: Troubleshooting Common Issues
19.1 ปัญหาที่พบบ่อยและวิธีแก้
รวมปัญหาที่ IT Admin พบบ่อยที่สุดบน Windows Server และวิธีแก้ไข:
Common Troubleshooting:
AD Replication Issues:
├── Diagnose:
│ ├── repadmin /replsummary
│ ├── repadmin /showrepl
│ ├── dcdiag /v /c /d /e
│ └── Event Log: Directory Services log
├── Common Causes:
│ ├── DNS misconfiguration (อันดับ 1!)
│ ├── Firewall blocking AD ports
│ ├── Time sync ต่างกันเกิน 5 นาที
│ ├── Network connectivity issues
│ └── USN rollback (จาก VM snapshot restore)
└── Fix:
├── ตรวจ DNS records: _msdcs zone
├── ตรวจ firewall rules
├── Sync time: w32tm /resync /force
└── Force replication: repadmin /syncall /APed
DNS Resolution Issues:
├── Diagnose:
│ ├── nslookup server01.corp.company.co.th
│ ├── Resolve-DnsName server01 -DnsOnly
│ ├── ipconfig /displaydns
│ └── Get-DnsServerZone
├── Common Causes:
│ ├── DNS server ไม่ respond
│ ├── Missing DNS records
│ ├── Stale DNS records
│ ├── DNS cache poisoning
│ └── Forwarder issues
└── Fix:
├── ipconfig /flushdns
├── Clear-DnsServerCache
├── Register-DnsClient
└── ตรวจ DNS zone settings
DHCP Issues:
├── No IP address from DHCP:
│ ├── ตรวจ DHCP service status
│ ├── ตรวจ scope: address pool เต็มไหม?
│ ├── ตรวจ DHCP relay agent (ถ้า client คนละ subnet)
│ ├── ตรวจ firewall: UDP 67/68
│ └── ipconfig /release → ipconfig /renew
├── Duplicate IP addresses:
│ ├── ตรวจ DHCP exclusion range
│ ├── ตรวจ static IPs ที่ตรงกับ DHCP range
│ └── Enable DHCP conflict detection
└── DHCP failover issues:
├── Invoke-DhcpServerv4FailoverReplication
└── Check partner state
Performance Issues:
├── High CPU:
│ ├── Get-Process | Sort-Object CPU -Descending | Select -First 10
│ ├── Performance Monitor → CPU queue length
│ └── Common: antivirus scan, Windows Update, backup
├── High Memory:
│ ├── Get-Process | Sort-Object WorkingSet -Descending | Select -First 10
│ ├── ตรวจ memory leak (working set เพิ่มเรื่อยๆ)
│ └── Consider: increase RAM or optimize services
├── Disk I/O:
│ ├── Performance Monitor → Disk Queue Length
│ ├── Get-PhysicalDisk | Get-StorageReliabilityCounter
│ └── Solution: SSD upgrade, Storage Spaces tiering
└── Blue Screen (BSOD):
├── Check: Event Viewer → System log
├── Analyze: WinDbg dump file
├── Common: driver issues, hardware failure, memory error
└── Run: sfc /scannow, chkdsk /f
ส่วนที่ 20: สรุปและ Checklist สำหรับ IT Admin
20.1 Windows Server 2025 Deployment Checklist
รวม checklist ทั้งหมดสำหรับการ deploy Windows Server 2025 ให้พร้อมใช้งานใน production:
Complete Deployment Checklist:
Pre-Deployment:
☐ ตรวจสอบ hardware compatibility
☐ วาง network design (IP, VLAN, DNS)
☐ เลือก edition ที่เหมาะสม (Standard/Datacenter)
☐ จัดหา licenses + CALs
☐ สร้าง installation media
☐ Backup ระบบเดิม (ถ้า migration)
☐ วาง maintenance window
Installation:
☐ Install Windows Server 2025
☐ Set hostname ตาม naming convention
☐ Configure static IP address
☐ Set time zone (UTC+7)
☐ Install Windows Updates ทั้งหมด
☐ Join domain (ถ้ามี)
☐ Install roles (AD DS, DNS, DHCP, etc.)
Post-Installation Security:
☐ Enable Windows Firewall ทุก profile
☐ Disable SMBv1
☐ Enable SMB signing + encryption
☐ Configure audit policies
☐ Enable PowerShell logging
☐ Install antivirus/EDR
☐ Enable Credential Guard
☐ Configure LAPS
☐ Apply CIS baseline GPO
Operations:
☐ Configure Windows Server Backup
☐ Set up monitoring (WAC, SNMP, Azure Monitor)
☐ Configure WSUS/Azure Update Management
☐ Document configuration (IP, hostname, roles, passwords)
☐ Create runbook สำหรับ common tasks
☐ Test disaster recovery procedure
☐ Train team members
Monthly Maintenance:
☐ Review and apply Windows Updates (Patch Tuesday)
☐ Check AD replication health
☐ Review security logs
☐ Verify backup integrity (test restore)
☐ Check disk space
☐ Review user accounts (disable inactive)
☐ Update documentation
20.2 คำแนะนำสุดท้าย
Windows Server 2025 เป็น การ upgrade ที่คุ้มค่า จาก Server 2019/2022 โดยเฉพาะ features ด้าน security (Credential Guard by default, Hotpatch), storage (NVMe improvements, SMB over QUIC), และ AD improvements (32K page size) สำหรับ IT Admin ที่กำลังวางแผน infrastructure ใหม่ หรือ migrate จาก version เก่า Windows Server 2025 เป็นตัวเลือกที่ดีที่สุดในปี 2026
Final Recommendations:
สำหรับ IT Admin มือใหม่:
├── เริ่มจาก Evaluation version (free 180 days)
├── ติดตั้งใน VM (Hyper-V, VMware, VirtualBox)
├── ฝึก: AD, DNS, DHCP, File Server, GPO
├── ศึกษา PowerShell ให้คล่อง
├── สอบ Microsoft Certified: Windows Server Hybrid Administrator Associate
└── Join community: Thai IT Admin groups, Microsoft Learn
สำหรับองค์กรที่ยังใช้ Server เก่า:
├── Server 2008/2008 R2: ⚠ หมด support แล้ว — migrate ด่วน!
├── Server 2012/2012 R2: ⚠ หมด support แล้ว — migrate ด่วน!
├── Server 2016: Extended support จบ 2027 — เริ่มวาง plan
├── Server 2019: ยังมีเวลา แต่ควร plan upgrade
├── Server 2022: ยัง OK — upgrade เมื่อ feature ใหม่จำเป็น
└── ใหม่ทั้งหมด: ใช้ Server 2025 เลย
สำหรับ Hybrid Cloud:
├── ใช้ Azure Arc เชื่อม on-prem servers กับ Azure
├── Azure Update Management สำหรับ patch management
├── Azure Backup สำหรับ cloud backup
├── Azure Monitor สำหรับ monitoring
├── พิจารณา Datacenter: Azure Edition สำหรับ Hotpatch
└── Azure Site Recovery สำหรับ DR
Windows Server 2025 เป็นระบบปฏิบัติการ server ที่สมบูรณ์ที่สุดจาก Microsoft — ด้วย features ใหม่ที่ตอบโจทย์ทั้ง on-premises, hybrid cloud, และ security ที่แข็งแกร่งขึ้น IT Admin ที่เชี่ยวชาญ Windows Server จะยังคงเป็นที่ต้องการของตลาดอีกนานหลายปี — ลงทุนเรียนรู้ตอนนี้ คุ้มค่าที่สุด