Powershell script to change IPs.. or how to run thing as admin

I’m a big fan of one-click build yadda, yadda. 
It’s not that feasible in distributed systems (which is what I’m doing right now), but today I got a tiny step closer to it.
We’re using two different subnetworks (one for production, one for everything else.) Switching on hardware with just one NIC sucks. Sucked. I simply used a powershell script like this one:

http://fatbeards.blogspot.de/2008/06/change-dnswins-ip-on-multiple-servers.html

The fascinating thing, was however, creating a desktop shortcut. For some reason, powershell doesn’t do compatibility mode with “Always run as admin” (it’s a Win7 thing, so it’s kinda logical, but..) Took me an hour or two to figure out that you need to switch to the shortcut->advanced menu instead.
Perfectly logical.
Anyways, I’m pretty happy with the result.
Sometimes it’s the simple things.

Image

Advertisements

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

%d bloggers like this: