Running the Dig utility from Windows command line

How to install and use the dig utility on a Windows system

The dig (domain information groper) utility is something I use on my Linux hosts so often that I miss it when I move back to a Windows host. Here’s how to install and use the dig utility on a Windows system:

  1. Download the BIND package from the Internet Systems Consortium web site for your Windows
  2. Extract to the directory that you’d like to run the program from, probably C:UsersMyUsername
  3. Run the dig command

Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:Userstechpain>dig mx ; <<>> DiG 9.9.5-W1 <<>> mx ;; global options: +cmd ;; Got answer: ;; ->>HEADER<
Dan Esparza’s blog has a great post on different ways to use the dig utility and understanding the output.

Also, check out how to run the WhoIs utility from Windows command line.

Windows dig command options


WhoIs lookup from Windows command line

A WhoIs lookup will show the registration record for a domain name, and being able to run this right from the command line is really convenient.

This utility will run on Windows XP and higher (client) and Windows Server 2003 and higher (server).

Download the utility from the Windows Sysinternals site and copy it to the path that you want to use (probably C:\Users\MyUsername). After that you can run the WhoIs utility like this:

Windows WhoIs - Command line example
An example whois lookup from the Windows command line


WhoIS command and output

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.


Whois v1.11 - Domain information lookup utility
Sysinternals -
Copyright (C) 2005-2012 Mark Russinovich

Connecting to
Connecting to

Registrar WHOIS Server:
Registrar URL:
Updated Date: 2013-10-22T03:40:00-06:00
Creation Date: 2010-08-04T00:59:03-06:00
Registrar Registration Expiration Date: 2017-08-04T00:59:03-06:00
Registrar:, Inc.
Registrar IANA ID: 625
Registrar Abuse Contact Email:
Registrar Abuse Contact Phone: +1.17202492374
Domain Status: clientTransferProhibited
Registrant Name: Whois Agent
Registrant Organization: Whois Privacy Protection Service, Inc.
Registrant Street: PO Box 639
Registrant City: Kirkland
Registrant State/Province: WA
Registrant Postal Code: 98083
Registrant Country: US
Registrant Phone: +1.4252740657
Registrant Fax: +1.4259744730
Registrant Email:
Admin Name: Whois Agent
Admin Organization: Whois Privacy Protection Service, Inc.
Admin Street: PO Box 639
Admin City: Kirkland
Admin State/Province: WA
Admin Postal Code: 98083
Admin Country: US
Admin Phone: +1.4252740657
Admin Fax: +1.4259744730
Admin Email:
Tech Name: Whois Agent
Tech Organization: Whois Privacy Protection Service, Inc.
Tech Street: PO Box 639
Tech City: Kirkland
Tech State/Province: WA
Tech Postal Code: 98083
Tech Country: US
Tech Phone: +1.4252740657
Tech Fax: +1.4259744730
Tech Email:
Name Server:
Name Server:
DNSSEC: NotApplicable
URL of the ICANN WHOIS Data Problem Reporting System:

>>> Last update of WHOIS database: 2014-02-15T13:50:43-07:00 <<< The Data in the, Inc. WHOIS database is provided by, Inc. for information purposes, and to assist persons in obtaining information about or re lated to a domain name registration record., Inc. does not guarantee i ts accuracy. By submitting a WHOIS query, you agree that you will use this Data only for lawful purposes and that, under no circumstances will you use this Dat a to: (1) allow, enable, or otherwise support the transmission of mass unsolici ted, commercial advertising or solicitations via e-mail (spam); or (2) enable hi gh volume, automated, electronic processes that apply to, Inc. (or its systems)., Inc. reserves the right to modify these terms at any time. By submitting this query, you agree to abide by this policy.

Also, check out how to run the dig utility from Windows command line.


Changing the Remote Desktop (RDP) Listening Port Number

Quick regedit to change your RDP port in Windows

Changing the port number for RDP (remote desktop protocol) just involves a simple regedit:

RDP - Remote Desktop Protocol

  1. Start > Search > Regedit
  2. Browse to HKEY_LOCAL_MACHINE > System > CurrentControlSet > Control > TerminalServer > WinStations > RDP-Tcp
  3. Locate the PortNumber subkey, change it to ‘decimal’ and change the Port number
  4. Adjust firewalls appropriately
  5. Reboot

Please keep in mind that this is not a security solution! Whenever possible, don’t leave your RDP port public facing!

RDP - Remote Desktop Protocol -


Installing Ubuntu – Windows 7 using Windows Virtual PC

Windows Virtual PC Console

A post at talks about installing Ubuntu 8.04 as a virtual machine in Windows using Windows Virtual PC. I’ve found that with a few small modifications, 9.10 installs very easily as well.
Here are the steps to install Ubuntu 9.10 as a VM in Windows 7 using Windows Virtual PC:

1) If you don’t already have it, download and install Windows Virtual PC

2) Launch Windows Virtual PC and click on ‘Create virtual machine’ at the top of the window.

3) Name your VM, click ‘Next’, select the amount of RAM you’d like to allocate, click ‘Next’, and click ‘Create’.

4) Insert the media that contains the .ISO and launch the new VM (by double-clicking).

5) The VM will boot off of the media. Select your language and hit ‘enter’.

6) Hit ‘F4’ (for alternate starting mode) and select ‘Safe graphics mode’.

7) Hit ‘F6’. Delete quiet splash -- and replace it with vga=791 noreplace-paravirt

8) Select ‘Try Ubuntu without changes…’ Wait for the live session to load and then double-click the ‘Install’ icon on the VM desktop. Note: Win 7 will probably warn you that the mouse will be taken over by the VM, but it should also tell you the key combo to release it again. Remember this info.

9) Go through the Ubuntu install process as usual.

10) Eject the disc and click on ‘Restart now’.

11) When Grub loads, hit ‘e’ to edit the first entry. Replace splash quiet with vga=791 noreplace-paravirt

12) Hit ‘Ctrl’ + ‘x’ to boot with the options you specified.

13) Ubuntu will boot. Log in and edit /boot/grub/menu.lst to make the boot options permanent. Once again, replace splash quiet with vga=791 noreplace-paravirt

Ubuntu VM in Windows Virtual PC


Joining a VM to a domain – Windows 7 XP mode

XP Mode (the Windows 7 VM for XP compatibility) is set to NAT by default. This works for general internet access, as explained at “NAT allows the host machine to act as an agent between the external network (e. g. Corpnet or Internet) and the VMs running on that host. The network will use the host’s IP address itself, which represents the group of VMs on that host, to communicate with the VMs.”

I ran into problems trying to join the virtual machine to a domain, as the VM could not see the domain controller. The fix is simply to change the network adapter on the VM. Here’s how:

1) Launch the VM (XP mode)

2) Select ‘Tools’>’Settings’ in the VM Toolbar

3) Select ‘Networking’ on the left

4) In the dropdown for your network adapter select your ethernet card

XP mode network adapter
XP mode network adapter

For more info, check out Networking and Using Windows XP Mode and XP Mode in Windows 7 is a scam


Make Ubuntu 9 look like Windows 7

This just feels plain wrong, but it is what it took to run Ubuntu on some temporary training machines.

Make Ubuntu 9.10 look like Windows 7

There is a post at on how to make Ubuntu 9.10 look like Windows 7. Here are the steps that they provide:

Type or copy and paste all of the following in a terminal:

cd $HOME


chmod 0755 $HOME/

WARNING: This will entirely change the look and feel of your Ubuntu desktop.

Please note: The gnomenu program will produce load error messages, just accept the “Yes” or “Ok” and “reload” options. This is a bug on Ubuntu 9.10.


Logout and login again.

Check all the applets are in the right location on the bottom panel and then lock them in position. The final bottom panel and gnome menu should look something like the one in the screenshot below. By right-clicking on or near an applet on the bottom panel you can move it after unlocking it.

Windows 7 theme for Ubuntu 9.10


Windows 7 – Tips and Tricks

Accessing Administrative Shares (\HOSTNAMEc$)

From To enable administrative shares you gotta make a registry change. Click on the orb and in the search box type ‘regedit’ and hit enter. Browse to


Add a new DWORD called “LocalAccountTokenFilterPolicy” and give it a value of 1. Reboot and yer done! (Applies to Vista too!)

Allow ICMP (ping) Requests Through Firewall

Right click ‘cmd’ from the start menu and select ‘Run as Administrator’, then

netsh firewall set icmpsetting 8 enable

and to enable again

netsh firewall set icmpsetting 8 disable

(Applies to Vista too!)

Get back your Quick Launch toolbar

1. Right-click the taskbar, choose Toolbars / New Toolbar
2. In the folder selection dialog, enter the following string and hit OK:
%userprofile%AppDataRoamingMicrosoftInternet ExplorerQuick Launch
3. Turn off the “lock the taskbar” setting, and right-click on the divider. Make sure that “Show text” and “Show title” are disabled and the view is set to “small icons”.
4. Use the dividers to rearrange the toolbar ordering to choice, and then lock the taskbar again.

Starting Windows Explorer from “My Computer”

From Tim Sneath’s Blog:
If you spend more time manipulating files outside of the documents folders than inside, you might want to change the default starting directory for Windows Explorer so that it opens at the Computer node:

To do this, navigate to Windows Explorer in the Start Menu (it’s in the Accessories folder). Then edit the properties and change the target to read:

%SystemRoot%explorer.exe /root,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

Windows 7 Downgrade Rights – Warning!

Taken from

Only certain OEM versions of Windows 7 include downgrade rights:

  • Windows 7 Professional and Windows 7 Ultimate include downgrade rights to Windows Vista Business and Windows Vista Ultimate.
  • Windows 7 Professional and Windows 7 Ultimate temporarily includes downgrade rights to Windows XP Professional, Windows XP Tablet PC Edition, or Windows XP x64 Edition.
  • Other OEM Windows 7 versions (for instance, Windows 7 Home Basic and Windows 7 Home Premium) do not include downgrade rights.

Note that Windows 7 end user downgrade rights will be available for approximately 18 months after the general availability of Windows 7 (April, 2011) or the release of a Windows 7 Service Pack, whichever is earlier.

Customers must:

  • Purchase a PC preinstalled with Windows 7.
  • Accept the Windows 7 Software License Terms.
  • Perform the downgrade or authorize an Original Equipment Manufacturer (OEM) to perform it.

See additional details and FAQ.

The Downgrade Process

Follow these steps to downgrade to a previous version of Windows:

  1. Obtain genuine Windows 7 Professional or Windows 7 Ultimate and a corresponding product key.
    • The media should come from a prior legally licensed version from the OEM or Retail channels.
    • Additionally an end user, who is licensed separately through Microsoft Volume Licensing (VL) programs, may provide their VL media and key to their system builder to use to facilitate the downgrade on only their systems.
  2. Insert Windows 7 Professional or Windows 7 Ultimate media in the CD drive and follow the installation instructions.
  3. Type the product key.
    • If the software was previously activated, you won’t be able to activate it online. In this case, the appropriate local Activation Support phone number will be displayed. Call the number and explain the circumstances. Once it is determined that the end user has a valid Windows Vista Business or Windows Vista Ultimate license, the customer service representative will provide a single-use activation code to activate the software.
    • In this case, the appropriate local Activation Support phone number will be displayed.
    • Call the number and explain the circumstances.
    • Once it is determined that the end user has a valid Windows 7 Professional or Windows 7 Ultimate license, the customer service representative will provide a single-use activation code to activate the software.
  4. Activate the software.