googlemad Posted April 23, 2015 Posted April 23, 2015 Some of our virtual servers have an additional NIC for our DMZ network, which the firewall likes to keep playing up with. If we restart the DMZ NIC on the server through LAN Connections however the external world can access the server again. So as a bit of a fail safe is there any way it can be scheduled so the servers automatically perform this reset say once a day at 3am? (It only takes a few seconds!)
halbaradkenafin Posted April 23, 2015 Posted April 23, 2015 Should be possible to script it with Powershell using Restart-NetAdapter, if they all have the same name and you can put together a text/csv file of the server names you can do something like: $Servers = Import-CSV -path 'C:\Path\to\File.csv' foreach ($Server in $Servers) { Invoke-Command -ComputerName $Server -Scriptblock {Restart-NetAdapter -Name "DMZ NIC"} } Save it to a ps1 file and then create a Scheduled task from a central device that is available at the intended time (a DC or something probably), the Action for the scheduled task is Powershell.exe and in the Additional Arguments box put the path to the ps1 file.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now