ภาพรวมระบบUser
ข้อมูล OS และเครื่อง
ดูชื่อเครื่อง รุ่น Windows และวันติดตั้ง
POWERSHELL COMMAND
Get-ComputerInfo | Select-Object CsName,WindowsProductName,WindowsVersion,OsBuildNumber,OsInstallDate
ตัวอย่างผลลัพธ์
CsName : WIN-SRV01
WindowsProductName : Windows Server 2022 Standard
WindowsVersion : 21H2
OsBuildNumber : 20348
OsInstallDate : 1/15/2026 09:00:00
ภาพรวมระบบUser
Uptime / Last Boot
ดูเวลาที่เซิร์ฟเวอร์บูตล่าสุดและระยะเวลาทำงาน
POWERSHELL COMMAND
$os = Get-CimInstance Win32_OperatingSystem; [pscustomobject]@{LastBoot=$os.LastBootUpTime;Uptime=(Get-Date)-$os.LastBootUpTime}ตัวอย่างผลลัพธ์
LastBoot Uptime
-------- ------
10/28/2026 08:30:00 5.01:12:22
ภาพรวมระบบUser
CPU Load
ดูเปอร์เซ็นต์การใช้งาน CPU ณ ช่วงเวลาที่อ่าน
POWERSHELL COMMAND
Get-CimInstance Win32_Processor | Select-Object Name,LoadPercentage,NumberOfCores,NumberOfLogicalProcessors
ตัวอย่างผลลัพธ์
Name LoadPercentage NumberOfCores NumberOfLogicalProcessors
---- -------------- ------------- -------------------------
Intel(R) Xeon(R) CPU 18 4 8
ภาพรวมระบบUser
Memory Usage
แสดง RAM ทั้งหมด ใช้งาน และคงเหลือหน่วย GB
POWERSHELL COMMAND
$o=Get-CimInstance Win32_OperatingSystem; [pscustomobject]@{TotalGB=[math]::Round($o.TotalVisibleMemorySize/1MB,2);FreeGB=[math]::Round($o.FreePhysicalMemory/1MB,2);UsedPct=[math]::Round((1-$o.FreePhysicalMemory/$o.TotalVisibleMemorySize)*100,1)}ตัวอย่างผลลัพธ์
TotalGB FreeGB UsedPct
------- ------ -------
16 5.28 67
ภาพรวมระบบUser
Top 10 CPU Processes
ค้นหา Process ที่ใช้ CPU สะสมมาก (ไม่ใช่ CPU% ปัจจุบัน)
POWERSHELL COMMAND
Get-Process | Sort-Object CPU -Descending | Select-Object -First 10 ProcessName,Id,CPU,WorkingSet64
ตัวอย่างผลลัพธ์
ProcessName Id CPU WorkingSet64
----------- -- --- ------------
sqlservr 4420 9082.45 6421225472
w3wp 3240 1268.12 438304768
⚠ CPU เป็นเวลาประมวลผลสะสม วัดการใช้ CPU ปัจจุบันด้วย Performance Counters
ภาพรวมระบบUser
Top 10 Memory Processes
ค้นหา Process ที่ใช้ Working Set มากสุด
POWERSHELL COMMAND
Get-Process | Sort-Object WorkingSet64 -Descending | Select-Object -First 10 ProcessName,Id,@{N="RAM_MB";E={[math]::Round($_.WorkingSet64/1MB,1)}}ตัวอย่างผลลัพธ์
ProcessName Id RAM_MB
----------- -- ------
sqlservr 4420 6124.3
w3wp 3240 418.0
StorageUser
พื้นที่ Disk
ตรวจสอบ Drive และพื้นที่ว่างทั้งหมด
POWERSHELL COMMAND
Get-CimInstance Win32_LogicalDisk -Filter "DriveType=3" | Select-Object DeviceID,@{N="SizeGB";E={[math]::Round($_.Size/1GB,1)}},@{N="FreeGB";E={[math]::Round($_.FreeSpace/1GB,1)}}ตัวอย่างผลลัพธ์
DeviceID SizeGB FreeGB
-------- ------ ------
C: 150.0 42.6
D: 500.0 271.4
StorageAdmin
Physical Disks
ดูสถานะดิสก์จริงจาก Storage Provider
POWERSHELL COMMAND
Get-PhysicalDisk | Select-Object FriendlyName,MediaType,HealthStatus,OperationalStatus,Size
ตัวอย่างผลลัพธ์
FriendlyName MediaType HealthStatus OperationalStatus Size
------------ --------- ------------ ----------------- ----
Disk 0 SSD Healthy OK 256060514304
⚠ บาง VM หรือ RAID Controller ไม่แสดงสถานะ PhysicalDisk ที่แท้จริง
StorageUser
Volumes
ดู File System สถานะและพื้นที่ว่าง
POWERSHELL COMMAND
Get-Volume | Select-Object DriveLetter,FileSystem,HealthStatus,SizeRemaining,Size
ตัวอย่างผลลัพธ์
DriveLetter FileSystem HealthStatus SizeRemaining Size
----------- ---------- ------------ ------------- ----
C NTFS Healthy 45741441024 161061273600
StorageAdmin
SMB Shares
ดู Share ที่เปิดให้บริการ
POWERSHELL COMMAND
Get-SmbShare | Select-Object Name,Path,Description
ตัวอย่างผลลัพธ์
Name Path Description
---- ---- -----------
ADMIN$ C:\Windows Remote Admin
SharedDrive F:\SharedDrive Team Share
NetworkUser
IP Address
ดู IPv4 ของทุก Interface (ไม่รวม Loopback)
POWERSHELL COMMAND
Get-NetIPAddress -AddressFamily IPv4 | Where-Object {$_.IPAddress -ne "127.0.0.1"} | Select-Object InterfaceAlias,IPAddress,PrefixLengthตัวอย่างผลลัพธ์
InterfaceAlias IPAddress PrefixLength
-------------- --------- ------------
Ethernet 10.119.203.70 25
NetworkUser
Gateway / DNS
ดู Gateway และ DNS Servers
POWERSHELL COMMAND
Get-NetIPConfiguration | Select-Object InterfaceAlias,IPv4DefaultGateway,DNSServer
ตัวอย่างผลลัพธ์
InterfaceAlias IPv4DefaultGateway DNSServer
-------------- ------------------ ---------
Ethernet {MSFT_NetRoute} {MSFT_DNSClientServerAddress}NetworkUser
Ping Target
ทดสอบ ICMP ไปยังปลายทาง แก้ค่า IP ก่อนใช้
POWERSHELL COMMAND
Test-Connection -ComputerName 10.119.203.1 -Count 4
ตัวอย่างผลลัพธ์
Source Destination IPV4Address Latency
------ ----------- ----------- -------
WIN-SRV01 10.119.203.1 10.119.203.1 2 ms
⚠ ICMP อาจถูก Firewall ปิด แม้บริการ TCP ยังใช้งานได้
NetworkUser
ทดสอบ TCP Port
ตรวจสอบการเชื่อมต่อไปยังปลายทาง/Port
POWERSHELL COMMAND
Test-NetConnection -ComputerName 10.119.203.201 -Port 7700
ตัวอย่างผลลัพธ์
ComputerName : 10.119.203.201
RemotePort : 7700
InterfaceAlias : Ethernet
TcpTestSucceeded : True
NetworkUser
DNS Resolve
ตรวจสอบการแปลงชื่อ DNS
POWERSHELL COMMAND
Resolve-DnsName example.com -Type A
ตัวอย่างผลลัพธ์
Name Type TTL Section IPAddress
---- ---- --- ------- ---------
example.com A 300 Answer 93.184.215.14
NetworkAdmin
Listening Ports
ดู TCP Ports ที่เปิด Listen และ PID
POWERSHELL COMMAND
Get-NetTCPConnection -State Listen | Sort-Object LocalPort | Select-Object LocalAddress,LocalPort,OwningProcess
ตัวอย่างผลลัพธ์
LocalAddress LocalPort OwningProcess
------------ --------- -------------
0.0.0.0 80 4328
0.0.0.0 3389 1200
NetworkAdmin
Port → Process
หาชื่อโปรเซสของ PID ที่ครอบครอง Port 443
POWERSHELL COMMAND
Get-NetTCPConnection -LocalPort 443 -ErrorAction SilentlyContinue | Select-Object LocalAddress,LocalPort,State,OwningProcess,@{N="Process";E={(Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue).ProcessName}}ตัวอย่างผลลัพธ์
LocalAddress LocalPort State OwningProcess Process
------------ --------- ----- ------------- -------
0.0.0.0 443 Listen 4328 httpd
NetworkUser
Routing Table
ตรวจสอบเส้นทาง IP และ Next Hop
POWERSHELL COMMAND
Get-NetRoute -AddressFamily IPv4 | Sort-Object RouteMetric | Select-Object -First 20 DestinationPrefix,NextHop,InterfaceAlias,RouteMetric
ตัวอย่างผลลัพธ์
DestinationPrefix NextHop InterfaceAlias RouteMetric
----------------- ------- -------------- -----------
0.0.0.0/0 10.119.203.1 Ethernet 0
NetworkUser
Trace Route
ตรวจสอบเส้นทางถึงปลายทาง
POWERSHELL COMMAND
Test-NetConnection example.com -TraceRoute
ตัวอย่างผลลัพธ์
ComputerName : example.com
PingSucceeded : True
TraceRoute : {10.119.203.1, 10.119.47.1, ...}NetworkAdmin
Firewall Profiles
ดูสถานะ Domain/Private/Public Firewall
POWERSHELL COMMAND
Get-NetFirewallProfile | Select-Object Name,Enabled,DefaultInboundAction,DefaultOutboundAction
ตัวอย่างผลลัพธ์
Name Enabled DefaultInboundAction DefaultOutboundAction
---- ------- -------------------- ---------------------
Domain True Block Allow
Private True Block Allow
Public True Block Allow
ServicesUser
Services ที่หยุด
แสดง Service ที่ไม่ได้ Running (บางตัวตั้งใจหยุด)
POWERSHELL COMMAND
Get-Service | Where-Object Status -eq "Stopped" | Select-Object -First 30 Name,DisplayName,StartType
ตัวอย่างผลลัพธ์
Name DisplayName StartType
---- ----------- ---------
Spooler Print Spooler Disabled
WSearch Windows Search Manual
⚠ Stopped ไม่ได้แปลว่าเสียเสมอไป ต้องเทียบ StartType และบทบาทเครื่อง
ServicesUser
ค้นหา Service
เช็กสถานะของบริการเฉพาะ เช่น W3SVC
POWERSHELL COMMAND
Get-Service -Name W3SVC -ErrorAction SilentlyContinue | Select-Object Name,Status,StartType
ตัวอย่างผลลัพธ์
Name Status StartType
---- ------ ---------
W3SVC Running Automatic
ServicesUser
Processes ทั้งหมด
ดู Process ID, RAM และชื่อโปรเซส
POWERSHELL COMMAND
Get-Process | Select-Object -First 30 ProcessName,Id,CPU,WorkingSet64
ตัวอย่างผลลัพธ์
ProcessName Id CPU WorkingSet64
----------- -- --- ------------
System 4 102.4 204800
svchost 1100 20.5 95535104
ServicesAdmin
Scheduled Tasks
ดู Task Scheduler พร้อมสถานะ
POWERSHELL COMMAND
Get-ScheduledTask | Select-Object -First 30 TaskName,TaskPath,State
ตัวอย่างผลลัพธ์
TaskName TaskPath State
-------- -------- -----
ServerBackup \ Ready
DailyHealth \ Running
Event LogsAdmin
System Errors 24h
ดู Event Level Error ใน System ย้อนหลัง 24 ชั่วโมง
POWERSHELL COMMAND
Get-WinEvent -FilterHashtable @{LogName="System";Level=2;StartTime=(Get-Date).AddHours(-24)} -MaxEvents 30 | Select-Object TimeCreated,Id,ProviderName,Messageตัวอย่างผลลัพธ์
TimeCreated Id ProviderName Message
----------- -- ------------ -------
11/1/2026 10:22:00 7031 Service Control... The service terminated...
Event LogsAdmin
Application Errors 24h
ดู Application Error ย้อนหลัง 24 ชั่วโมง
POWERSHELL COMMAND
Get-WinEvent -FilterHashtable @{LogName="Application";Level=2;StartTime=(Get-Date).AddHours(-24)} -MaxEvents 30 | Select-Object TimeCreated,Id,ProviderName,Messageตัวอย่างผลลัพธ์
TimeCreated Id ProviderName Message
----------- -- ------------ -------
11/1/2026 09:12:00 1000 Application Error Faulting application...
Event LogsAdmin
Unexpected Shutdown
ตรวจสอบ Event ID 41, 6008 (ไม่ใช่ทุกครั้งคือไฟดับ)
POWERSHELL COMMAND
Get-WinEvent -FilterHashtable @{LogName="System";Id=41,6008;StartTime=(Get-Date).AddDays(-30)} -ErrorAction SilentlyContinue | Select-Object TimeCreated,Id,Messageตัวอย่างผลลัพธ์
TimeCreated Id Message
----------- -- -------
10/20/2026 02:01:00 6008 The previous system shutdown was unexpected.
Event LogsAdmin
RDP Logon สำเร็จ
ตรวจสอบ Security Log Event 4624 แบบ Logon Type 10
POWERSHELL COMMAND
Get-WinEvent -FilterHashtable @{LogName="Security";Id=4624;StartTime=(Get-Date).AddDays(-1)} -MaxEvents 200 | Where-Object {$_.Properties.Count -gt 8 -and $_.Properties[8].Value -eq 10} | Select-Object TimeCreated,Id,Messageตัวอย่างผลลัพธ์
TimeCreated Id Message
----------- -- -------
11/1/2026 15:34:00 4624 An account was successfully logged on...
⚠ ต้องมีสิทธิ์อ่าน Security Log; Event 4624 โครงสร้างอาจต่างตาม OS
SecurityAdmin
Local Administrators
ตรวจสอบสมาชิกกลุ่ม Administrators
POWERSHELL COMMAND
Get-LocalGroupMember -Group "Administrators" | Select-Object Name,ObjectClass,PrincipalSource
ตัวอย่างผลลัพธ์
Name ObjectClass PrincipalSource
---- ----------- ---------------
WIN-SRV01\Admin User Local
DOMAIN\ServerAdmins Group ActiveDirectory
⚠ ชื่อกลุ่มอาจถูกเปลี่ยนภาษา/ชื่อ; ถ้าพบข้อผิดพลาดให้ตรวจสอบ SID S-1-5-32-544
SecurityAdmin
Local Users
ดูบัญชี Local และสถานะ Enabled
POWERSHELL COMMAND
Get-LocalUser | Select-Object Name,Enabled,LastLogon,PasswordRequired
ตัวอย่างผลลัพธ์
Name Enabled LastLogon PasswordRequired
---- ------- --------- ----------------
Administrator True 10/30/2026 08:30:00 True
Guest False False
SecurityUser
RDP Sessions
ตรวจสอบ Session ผู้ใช้ RDP
POWERSHELL COMMAND
quser
ตัวอย่างผลลัพธ์
USERNAME SESSIONNAME ID STATE IDLE TIME LOGON TIME
admin rdp-tcp#2 2 Active . 11/2/2026 8:30 AM
⚠ คำสั่ง quser อาจถูกปฏิเสธบน Session/เครื่องที่ไม่มีสิทธิ์
SecurityAdmin
Windows Defender
ดูสถานะ Microsoft Defender Antivirus
POWERSHELL COMMAND
Get-MpComputerStatus | Select-Object AMServiceEnabled,AntivirusEnabled,RealTimeProtectionEnabled,AntivirusSignatureLastUpdated
ตัวอย่างผลลัพธ์
AMServiceEnabled : True
AntivirusEnabled : True
RealTimeProtectionEnabled : True
AntivirusSignatureLastUpdated : 11/1/2026 08:00:00
⚠ คำสั่งนี้ใช้ได้เมื่อมี Microsoft Defender Antivirus cmdlets
UpdatesUser
Windows Hotfixes
ดู KB ล่าสุดที่ติดตั้ง
POWERSHELL COMMAND
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 15 HotFixID,Description,InstalledOn
ตัวอย่างผลลัพธ์
HotFixID Description InstalledOn
-------- ----------- -----------
KB5030000 Security Update 10/15/2026
⚠ Get-HotFix ไม่ครอบคลุมการอัปเดตทุกประเภท
UpdatesAdmin
Pending Reboot
ดูสัญญาณ Pending Reboot จาก Registry (ไม่ครอบคลุมทุกผลิตภัณฑ์)
POWERSHELL COMMAND
$paths=@("HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending","HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired"); $paths | ForEach-Object {[pscustomobject]@{Path=$_;Pending=Test-Path $_}}ตัวอย่างผลลัพธ์
Path Pending
---- -------
HKLM:\SOFTWARE\...\RebootPending False
HKLM:\SOFTWARE\...\RebootRequired True
RolesAdmin
Windows Features
ดู Role/Feature ที่ติดตั้งบน Windows Server
POWERSHELL COMMAND
Get-WindowsFeature | Where-Object Installed | Select-Object Name,DisplayName,InstallState
ตัวอย่างผลลัพธ์
Name DisplayName InstallState
---- ----------- ------------
Web-Server Web Server (IIS) Installed
FS-FileServer File Server Installed
⚠ ใช้บน Windows Server ที่มี ServerManager Module
RolesAdmin
IIS Websites
ดู Website และสถานะ IIS
POWERSHELL COMMAND
Import-Module WebAdministration; Get-Website | Select-Object Name,State,PhysicalPath,Bindings
ตัวอย่างผลลัพธ์
Name State PhysicalPath Bindings
---- ----- ------------ --------
Default Web Site Started C:\inetpub\wwwroot http *:80:
⚠ ต้องติดตั้ง IIS และ WebAdministration
RolesAdmin
IIS App Pools
ตรวจสอบ Application Pool ใน IIS
POWERSHELL COMMAND
Import-Module WebAdministration; Get-ChildItem IIS:\AppPools | Select-Object Name,State,managedRuntimeVersion
ตัวอย่างผลลัพธ์
Name State managedRuntimeVersion
---- ----- ---------------------
DefaultAppPool Started v4.0
⚠ ต้องติดตั้ง IIS และ WebAdministration
RolesAdmin
Failover Cluster Nodes
ดู Node ใน Windows Failover Cluster
POWERSHELL COMMAND
Get-ClusterNode | Select-Object Name,State,NodeWeight
ตัวอย่างผลลัพธ์
Name State NodeWeight
---- ----- ----------
CLUSTER01 Up 1
CLUSTER02 Up 1
⚠ ใช้เฉพาะระบบที่ติดตั้ง Failover Clustering
RolesAdmin
Hyper-V VMs
ตรวจสอบ VM และสถานะบน Hyper-V Host
POWERSHELL COMMAND
Get-VM | Select-Object Name,State,CPUUsage,MemoryAssigned,Uptime
ตัวอย่างผลลัพธ์
Name State CPUUsage MemoryAssigned Uptime
---- ----- -------- -------------- ------
APP-VM01 Running 8 4294967296 2.04:11:00
⚠ ใช้บน Hyper-V Host ที่มี Hyper-V module
RolesAdmin
Disk I/O Performance
อ่านดิสก์รวมจาก Performance Counter สองตัวอย่าง
POWERSHELL COMMAND
Get-Counter -Counter "\PhysicalDisk(_Total)\Disk Reads/sec","\PhysicalDisk(_Total)\Disk Writes/sec" -SampleInterval 1 -MaxSamples 2 | Select-Object -ExpandProperty CounterSamples | Select-Object Path,CookedValue
ตัวอย่างผลลัพธ์
Path CookedValue
---- -----------
\physicaldisk(_total)\disk reads/sec 42.1
\physicaldisk(_total)\disk writes/sec 19.7
⚠ ชื่อ Performance Counter อาจต่างตามภาษาของ Windows