Hello, As a batch developer you CAN edit the server.properties file with a short simple command example here:
powershell -Command "(Get-Content 'server.properties') -replace '^motd=.*', 'motd=A Minecraft Server' | Set-Content 'server.properties'"
Well, it depends on the virus. If it's a worm or a ransomware virus, it will spread across the network and infect your real computer. To stop this, you would need to turn off your internet connection and unplug your Ethernet. so that the virus can't even travel through your wifi to infect your computer