Add domain user to local vista administrator group

Recently I had to re-format my work laptop and I decided to fix one of the most annoying thing that I dealt with everyday but I was too lazy to research.

My company has a group policy setup for UAC. We need to have it enabled at all times but the pain of entering the username (domainusername) and password every time I wanted to start visual studio or IIS console was very unproductive and tedious.

Turns out a simple command at CMD prompt can do the trick:

net localgroup Administrators /add domainusername

Behold – no more password – one click and we are elevated. Oh the joys of Windows Vista.

Update: This works for Windows 7 as well. – 8th June 2009