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