PowerShell utilities for managing DayZ servers. Includes startup scripts with mod management, resource limiting, and an XML configuration merger.
| Utility | Purpose | Best For |
|---|---|---|
dayz_server_start.ps1 |
Basic server startup with mod sorting and auto-restart | Standard deployments |
dayz_server_start_cpumemlimit.ps1 |
Server startup with CPU/RAM/FPS limits and affinity pinning | Resource-constrained hosts |
mergexml.ps1 |
Merge multiple XML config files into one | Consolidating mod configurations |
- Windows Server or Windows 10/11
- PowerShell 5.0+
- DayZ Server installed in the same directory or accessible via path
- Mod folders (prefixed with
@) in the server root
Basic server launcher with automatic mod detection, key management, and crash recovery.
- Detects mods — Scans for folders starting with
@ - Sorts by priority — Loads essential mods first (CF, Expansion, etc.)
- Copies .bikey files — Keeps server keys in sync with mod updates
- Watches server — Detects crashes and restarts automatically
- Scheduled restarts — Restarts server on interval (default 3.5 hours)
Edit the top of the script:
$ServerExe = "DayZServer_x64.exe"
$Port = 2302
$RestartInterval = 3.5 # Hours
$CpuCount = 4
$LoadOrderPriority = @{
"@CF" = 0
"@Community-Online-Tools" = 1
# ... add/modify mods here ...
}
$ServerModList = @(
# "@ServerAdminTools" # Server-side only mods
).\dayz_server_start.ps1Runs indefinitely, restarting the server on crash or interval. Press Ctrl+C in the PowerShell window to stop.
Advanced server launcher with strict resource limits and CPU core pinning.
Everything dayz_server_start.ps1 does, plus:
- Caps FPS — Limits server simulation FPS
- Limits RAM — Sets max memory pool allocation
- Pins CPU cores — Uses CPU affinity mask to lock the process to specific cores
- Prevents runaway usage — Keeps resource-heavy mods contained
Same as basic script, plus:
$LimitFPS = 60 # Server simulation FPS cap
$MaxMem = 4096 # MB (4096 = 4GB, 6144 = 6GB)
$CpuCount = 4 # Cores to optimize for
$CpuAffinityMask = 15 # Bitmask for cores
# 1 = Core 0 only
# 3 = Cores 0, 1
# 15 = Cores 0, 1, 2, 3
# 63 = Cores 0-5.\dayz_server_start_cpumemlimit.ps1Same as basic script, but with resource constraints applied at startup.
Calculate your mask based on available cores:
Cores desired | Mask
-----------+------
1 | 1
2 | 3
3 | 7
4 | 15
5 | 31
6 | 63
8 | 255
Combines multiple XML files (typically DayZ configuration files from mods) into a single consolidated file.
- Finds all .xml files in the current directory
- Uses first file as base — Keeps its root structure
- Appends nodes from others — Imports child elements from each subsequent file
- Outputs types_MERGED.xml — New consolidated file
- Progress tracking — Shows merge status and node counts
- Merging custom
types.xmlfiles from multiple mods - Consolidating mod configuration XMLs
- Preparing files for server config deployment
# Place all XML files to merge in a folder
# Run from that folder:
.\mergexml.ps1Creates types_MERGED.xml in the same directory.
--------------------------------------------------
XML MERGE TOOL v2.0
--------------------------------------------------
[INIT] Found 5 files to process:
- types_base.xml
- types_expansion.xml
- types_custom.xml
- types_vehicles.xml
- types_items.xml
[STEP 1] Loading base file: types_base.xml
> Base loaded successfully. Root element: <types>
> Initial node count: 1200
[STEP 2] Starting merge process...
+ Reading file: types_expansion.xml -> Appended 340 nodes.
+ Reading file: types_custom.xml -> Appended 85 nodes.
...
[STEP 3] Saving output...
SUCCESS!
--------------------------------------------------
Total Files Merged : 5
Final Node Count : 1847
Output File : types_MERGED.xml
- Place server files and mods in a directory
- Edit
dayz_server_start.ps1with your config - Run the script:
.\dayz_server_start.ps1
- Use
dayz_server_start_cpumemlimit.ps1instead - Set
$CpuAffinityMaskbased on available cores - Adjust
$MaxMemand$LimitFPSas needed - Run the script
- Collect all mod
types.xmlfiles - Put them in a folder with
mergexml.ps1 - Run the script
- Use
types_MERGED.xmlin your server config
Server won't start
- Check that
DayZServer_x64.exeexists in the script directory - Verify the path in
$ServerExematches your installation - Check Event Viewer for system-level errors
Mods not loading
- Ensure mod folders start with
@ - Check load order priorities match your mods
- Look for .bikey files in the
keys/folder
CPU/Memory limits not working
- Some systems don't allow ProcessorAffinity changes
- Try running PowerShell as Administrator
- Check Windows Task Scheduler affinity settings
mergexml.ps1 fails
- Ensure you have at least 2 XML files in the directory
- Check that XML files are valid (no syntax errors)
- Run with Administrator privileges if permission denied
MIT
v1.0 — Initial release with three utilities