Resetting Windows Server 2003 and 2008 local account passwords

Recently I had a need to reset a few administrator accounts for Server 2003 and 2008. So, here’s the skinny on how to do that:

Server 2003
So officially, Microsoft says if you forget the Administrator password for your machine and you can’t login (ie it’s not a member of a domain, the domain is unavailable) your only recourse is to re-install. Hog wash! So for 2003, you’ll need a tool to reset the SAM (Security Accounts Manager) password for the account you want to access. A non-trojan horse laden version of ERD commander is harder to come by these days. Fortunately someone has come to the rescue with a tiny utility called NTRestTool ( 100% command line, and not very pretty, but it does the trick.

PowerShell setting a static IP

English: Screenshot of Windows PowerShell 1.0 ...
English: Screenshot of Windows PowerShell 1.0 Deutsch: Screenshot von Windows PowerShell 1.0 فارسی: عکس صفحه‌ی نمایش از ویندوز پاورشل نسخه‌ی 1.0 Русский: Сессия в Windows PowerShell (Photo credit: Wikipedia)

In an effort to force myself to learn/use powershell I installed a core install of Server 2012 for my WSUS. Here’s how you change the IP Address:

from the CMD prompt, ps.exe to get poweshell. If you’ve closed your command prompt, log off and back on, or press Ctrl+Alt+Del and start task manager, then run cmd and/or PS.exe

Changing the IP
# Import the NetAdapter module. This step is provided for clarity. It is not needed due to the new module autoloading feature in Windows PowerShell 3.0

Import-Module NetAdapter

# Retrieve the network adapter that you want to configure.

$netadapter = Get-NetAdapter -Name Ethernet

# Disable DHCP.

$netadapter | Set-NetIPInterface -DHCP Disabled

# Configure the IP address and default gateway.

$netadapter | New-NetIPAddress -AddressFamily IPv4 -IPAddress -PrefixLength 24 -Type Unicast -DefaultGateway

# Configure the DNS client server IP addresses.

Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses

If you screw up, do:  Remove-NetIPAddress -interfaceindex

Got this from:

SVN blues – committing a file that doesn’t appear to have changed

So recently I had an issue where I needed to commit a Truecrypt file in SVN, but as you probably already know, when you save content in Truecrypt, the file appears to be untouched to SVN. The modified date doesn’t change, nor does the size of the file. So, how to we check-in our changes?

A co-worker generously gave me this tip, so I’m passing it on to you:

from the CLI

#svn propset dummyproperty 1
#svn commit

By changing the properties of the file with useless info we can fool SVN into letting us check-in our file!