To help you set up a review protocol on your Windows 10 server that avoids duplication, kicks all players, locks the server, and performs checks every 4 hours starting at 2:00 a.m., here’s a full step-by-step guide based on your scope of work.
✅ Scope of Work Breakdown & Implementation
⚙️ 1. Set Up a Review Protocol (Batch Script / PowerShell)
We’ll create a script that:
-
Kicks all players
-
Locks or restarts the server app/service
-
Verifies connectivity and game query port
-
Runs on a 4-hour schedule from 2:00 a.m.
📁 Step 1: Prepare Review Script
A) Example: PowerShell Review Script (Save as review.ps1
)
powershell# 1. Kick all players (Example: via RCON, adjust to your game server) # Replace with appropriate RCON or admin tool command & "C:\GameServer\Tools\RCONTool.exe" kick all # 2. Lock server (e.g., stop game server service or disable joining) Stop-Process -Name "GameServerApp" -Force Start-Sleep -Seconds 10 # 3. Review operation (e.g., restart or validate files) Start-Process "C:\GameServer\ServerUpdater.exe" -ArgumentList "/review" # 4. Start server again Start-Process "C:\GameServer\GameServerApp.exe" # 5. Verify connectivity (basic check for TCP port 25565, adjust as needed) $port = 25565 $test = Test-NetConnection -ComputerName "127.0.0.1" -Port $port if ($test.TcpTestSucceeded) { Write-Host "Server port $port is accessible." } else { Write-Host "Port $port failed to respond!" }
Replace paths and port numbers with your actual server settings.
⏰ Step 2: Set Task Scheduler to Run Every 4 Hours Starting at 2:00 a.m.
A) Open Task Scheduler → Click Create Basic Task
-
Name:
Game Server Review Protocol
-
Trigger: Daily → Start at 2:00 AM
-
Repeat Task Every: 4 hours
-
Duration: 1 day
B) Action: Start a program
-
Program/Script:
powershell.exe
-
Add arguments:
-ExecutionPolicy Bypass -File "C:\Scripts\review.ps1"
🔐 Step 3: Lock the Server During Review
This depends on your game. Some examples:
-
Change the server config temporarily to disable joining
-
Block the game port temporarily via Windows Firewall
-
Use a maintenance mode if available
Example: Block port temporarily
powershell# Block New-NetFirewallRule -DisplayName "BlockGamePort" -Direction Inbound -LocalPort 25565 -Protocol TCP -Action Block # Wait during review Start-Sleep -Seconds 300 # Unblock Remove-NetFirewallRule -DisplayName "BlockGamePort"
📡 Step 4: Query Server Status (Optional Enhancements)
If you want to verify game server responsiveness:
-
Use tools like GameQ (PHP) or query-servers (Node.js)
-
Or simply ping the port via PowerShell as above
✅ Summary of What You Will Have:
Task | Implemented? |
---|---|
Kick all players | ✔ (via script/tool) |
Lock the server during review | ✔ (stop process or block port) |
Run review protocol (every 4 hrs) | ✔ (Task Scheduler) |
Verify connectivity | ✔ (Test-NetConnection) |
🔐 Optional Improvements
-
Log activity to a file with timestamps
-
Email admin if port check fails
-
Automatically upload logs to Google Drive or FTP