System Admin - ms windows

Windows 7 - System Maintenance / Cleanup

Regular activities to help avoid a system filling up with temporary files and old system restore data:

  1. Run "Disk Cleanup"
    • On a system that has been running a while without a cleanup the scans can take quite a while (ie >10 minutes)

    • Include extra files by clicking the "Cleanup system files" button
    • Once system files are included, an "More Options" tab is included where old restore points can be removed. Note that by default Windows allows up to 25% of the disk to be used by by restore points. With PC disks regularly over 1TB this can mean hundres of gigabytes of old restore points (which may also contribute to slowing the system down).

    • Be cautious about the "Programs and Features" function as you may accidentally remove programs that you use irregularly (but that you still want installed).
  2. Check the "Recycle Bin" - users often do not clean this up (so again it may contain hundreds of gigabytes of files managed by the system).
  3. Configure lower limits for temporary files:
    • Recycle Bin: Right-click on the "Recycle Bin", select "Properties" and set a reasonable (depends on the user) "Custom size" for each disk.

    • Restore Points: Click on the windows icon (main menu, lower left corner of the screen), right-click on "Computer", select "Properties"; select "System protection", select a drive under "Protection Settings" and press "Configure" button; under "Disk Space Usage" note the current "Max usage" remembering that the number is probably gigabytes (on a typical system with 1TB of drive the default allowed 170GB of restore points); drag the "Max usage" bar to the left to reduce the threshold - even the minimum of 1% on the above example system allowed 6GB of data. NOTE: it's important to do this for each drive, and note that on some systems with a much smaller recovery partition the numbers can look misleading because the 25% there is a much smaller number and the recovery partition will probably have restore points disabled.

  4. Consider a registry scan/cleanup. One example is CCleaner Free; with this tool the free tool includes a quick registry scan and cleanup which works well. The tool also includes a general system scan for files to remove but by default this will wipe out thing like browser cookies, HTML5 local storage and other files which you probably want to keep.

  5. (I throw in a few steps in this last step, they cover general windows sysadmin activities that have been common practice since XP) With the system cleaned up, run a disk check and defrag on each drive. It wouldn't hurt to install the latest virus definitions and run a full system scan as well. Check for any system updates available. Run msconfig and check things like the "Services" and "Startup" tabs to see if anything is automatically running that you don't need.

Base software list for a safe and sane installation

Setting up a windows workstation without immediately being compromised can be a struggle, here's a few tools that help:

In addition the following tools make it possible to use windows without the pain and suffering incurred by using the microsoft tools:

The "Windows Sysinternals" suite can be useful for various sysadmin tasks:

Work-arounds for system lock-downs

Outlook

TCP timeouts

The default limit for TCP retries under windows is very small - the result being that even a momentary loss of network connectivity can cause applications like putty to prematurely lose network connections.

As per the putty FAQ (http://www.chiark.greenend.org.uk/~sgtatham/putty/faq.html#faq-timeout):

A.7.11 PuTTY's network connections time out too quickly when network connectivity is temporarily lost.

This is a Windows problem, not a PuTTY problem. The timeout value can't be set on per application or per session basis. To increase the TCP timeout globally, you need to tinker with the Registry.

On Windows 95, 98 or ME, the registry key you need to create or change is

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\
  MSTCP\MaxDataRetries

(it must be of type DWORD in Win95, or String in Win98/ME). (See MS Knowledge Base article 158474 for more information.)

On Windows NT, 2000, or XP, the registry key to create or change is

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\
  Parameters\TcpMaxDataRetransmissions

and it must be of type DWORD. (See MS Knowledge Base articles 120642 and 314053 for more information.)

Set the key's value to something like 10. This will cause Windows to try harder to keep connections alive instead of abandoning them. 

BradsWiki: System Admin/MsWin (last edited 2016-12-01 22:15:15 by BradleyDean)