Windows

From DigitalOps.Org Wiki

Jump to: navigation, search

Contents

Links

Windows Tips & Tricks

What is the Windows equivalent of uptime?

From a command shell: net stats srv will kind of give you the same thing, look for the line "Statistics since....".

Edit User Registry of other users

When you make changes in the Windows Registry you normally can only make them for all users or the user account that is currently logged in. But what if you want to make them in another user account? There is an easy way to do that by loading the Registry hive of the user into the Registry.

Here is how this is done: Start the Windows Registry with the shortcut Windows R, typing regedit and pressing enter. Now mark the HKEY_Users folder in the Registry and click on File > Load Hive afterwards. The default directory that opens is the directory of the current user. Navigate to the user directory of the user that you want to make changes for, all available ones are listed in Document and Settings.

Enter that folder and look for the file ntuser.dat. That file is hidden, if you can’t locate it change the folder settings so that you can see hidden files and folders in Windows. A double-click on the file loads the Registry hive as a subfolder of HKEY_Users with the name that you have selected after clicking on the ntusers.dat file.

Source

List of Useful Control Panel Applets

Some Windows Control Panel applets that can be useful from the command line:

Name Equivalent
sysdm.cpl Control Panel -> System
ncpa.cpl Control Panel -> Network
cc.cpl Control Panel -> ClearCase (Normally found in the %CLEARCASE_HOME%/bin folder)

Useful list can be found here.

Tunneling with PuTTY

  1. Run PuTTY and create a new session to connect to a remote host that is running sshd. Fill in the hostname, the port (usually 22), make sure SSH is checked, give it a session name and hit Save.
  2. Click on “Tunnels” on the left and set up dynamic fowarding for a local port (e.g. 8000). Under “Add new forwarded port” type in 8000 for the source port, leave the destination blank, and check Auto and Dynamic. Then hit the Add button. If you did it correctly, you’ll see D8000 listed in the Forwarded Ports box.
  3. In your browser click on Connection Settings…
  4. Check Manual Proxy Configuration, leave most of the fields blank, but fill in 127.0.0.1 for the SOCKS v5 host with a port of 8000
  5. If you are running the current version of Firefox and would like to also protect DNS lookup information, you can open the about:config page, and change network.proxy.socks_remote_dns to true.

How to identify Domain Controllers on the network

All domain controllers (ADS) use:

> dsquery server

Primary DC:

> netdom query /D:domain.com FSMO

Plenty of other useful tips here.