From 18dc79c5d264e036f75e779855a3c099a29c03a3 Mon Sep 17 00:00:00 2001 From: kb01 Date: Sat, 13 Jan 2024 04:18:40 +0100 Subject: [PATCH] Started Adding Powershell Scripts --- script/minecraft-server-start.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 script/minecraft-server-start.ps1 diff --git a/script/minecraft-server-start.ps1 b/script/minecraft-server-start.ps1 new file mode 100644 index 0000000..a1acac8 --- /dev/null +++ b/script/minecraft-server-start.ps1 @@ -0,0 +1,15 @@ +$serverdir = "M:\project\minecraft-server-anywhere\survival" +$servername = "survival" + +# Load Environment Variables of Server +get-content $serverdir\$servername.env | ForEach-Object { + if (!$_.StartsWith("#") -and !($_.Length -eq 0)) { # Skips Empty and Commented Lines + $name, $value = $_.split('=') + Set-Variable "server.$name" "$value" + } +} + + + + +Get-Variable * \ No newline at end of file