Skip to content

Server 2019 Core and Insurgency Source or Avorion Server setup (PS Remote)

Robomikel edited this page Feb 16, 2020 · 1 revision

# Server 2019 Core and Insurgency Source/Avorion Server setup
# Server core update will prevent source server from starting

# client
winrm quickconfig
winrm set winrm/config/client '@{TrustedHosts="INSSERVER"}'
# winrm set winrm/config/client '@{TrustedHosts="INSSERVER,server2"}'

# server Side
Enable-PSRemoting -Force
winrm quickconfig
# set server name for previous client config
Rename-Computer -NewName INSSERVER -LocalCredential Administrator -PassThru
# set server static IP
New-NetIPAddress 1.1.1.2 –PrefixLength 24 -DefaultGateway 1.1.1.1
Set-DnsClientServerAddress -ServerAddresses 8.8.8.8

# start remote PS session as admin
Enter-PSsession INSSERVER -credential Administrator

# setup Network profile
Set-NetConnectionProfile -NetworkCategory Private
# setup firewall
Enable-NetFirewallRule -DisplayGroup "File and Printer Sharing"
Enable-NetFirewallRule -DisplayGroup "Remote Event Log Management"
Enable-NetFirewallRule -DisplayGroup "Windows Management Instrumentation (WMI)"
New-NetFirewallRule -DisplayName 'insserver' -Profile Domain, Public, Private -Direction Inbound -Action Allow -Protocol TCP -LocalPort 27015, 27005, 27020
New-NetFirewallRule -DisplayName 'insserver' -Profile Domain, Public, Private -Direction Inbound -Action Allow -Protocol UDP -LocalPort 27015, 27005, 27020

# ports for Avorion
New-NetFirewallRule -DisplayName 'avorion' -Profile Domain, Public, Private -Direction Inbound -Action Allow -Protocol TCP -LocalPort 27000, 27003, 27020,27021
New-NetFirewallRule -DisplayName 'avorion' -Profile Domain, Public, Private -Direction Inbound -Action Allow -Protocol UDP -LocalPort 27000, 27003, 27020,27021

# Install VCredist
# https://www.techpowerup.com/download/visual-c-redistributable-runtime-package-all-in-one/
# download through browser and copy to server using $admin share run .bat for install

# create user
$Password = Read-Host -AsSecureString
New-LocalUser "insserver" -Password $Password
Add-LocalGroupMember -Group "Remote Management Users" -Member "insserver"

# start remote PS session as user
Enter-PSsession INSSERVER -credential insserver
# install ssm and install ins
# OR
# install ssm and install avorion

# For ssm Monitor
# 1. As an Administrator of the server, go to Remote Server Manager -> Computer Management. On the left expand "Services and Applications" and right click "WMI Control". Go to "Properties".
# 2. In the newly open Window, click on Security tab.
# 3. Expand Root tree, and then click on the node CIMV2 or Root, and click the button security
# 4. In the newly open Window, click the button Advanced.
# 5. In the newly open Window, click the button Add under the permission tab.
# 6. In the newly open Window, click on “select a principal", then search for the user you that was having the problem.
# '7. In the applies to, choose “this namespace and subnamespace".
# 8. For the permission, check on “Execute Methods", “Enable Accounts" and “Remote Enable"
# 9. Click accept on all the open dialogue boxes
# 10. Restart WMI services. restart-service winmgmt -force