Get Default Gateway…Change Default Gateway

Sometimes, people change things. Sometimes people change subnets and default gateways and you aren’t allowed to inflict serious physical or emotional pain on them like a vengeful senior team member. You have to fix it. Actually that reminds of the time someone took ownership of all the GPO’s in an environment and gave himself the only permissions and everyone wondered why it all broke. And he screamed ‘Blamefest!’ at everyone when he got told off. Ah well, that’s what happens when you give full domain admin rights to an apprentice. But I digress!

Actually, changing default GW 2, The Search For A Script, came about because I was working on an environment where there was originally no internet, then some machines had a working GW, then other machines were given a different one and like many infrastructure related tasks I feel I may have to do again as part of process, I try and find a solution to automate or expedite for next time. So, with no further ado, I used these great links to Find the GW and Change the GW.

PSEXEC to Find:

Get Default GW

Powershell to Change:

Change GW

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s