PowerShell Scipt: Set/Reset The Static Gateway on Remote Systems

function Set-Gateway { #Get NICS via WMI $NICs = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -ComputerName $_ -Filter “IPEnabled=TRUE” foreach($NIC in $NICs) {$Gateway = “x.x.x.x” $NIC.SetGateways($Gateway) } } #This portion will ask for a file. I personally created a script to capture all of the #domain systems. You can use: #get-adcomputer -Filter * -Properties * | where {$_.operatingsystem…

Rate this: