ChrisTitus.com Resources for IT Professionals

24Nov/100

Force Network Connection Priority

This describes how to have an adapter take priority of all internet traffic over another. For instance, you have 2 different networks on a single computer, and the wired connection does all your internal communications, but you want the wireless adapter to do all outgoing internet applications (iexplore, firefox, etc...).

Set the Interface Metric
-Open Network Connections (ncpa.cpl)
-Open the Network Connection to take priority (Right click desired connection -> Properties)
-Select Internet Protocol (TCP/IP) (v4 if on Vista or 7) -> Properties
-Click Advanced button on General Tab
-Un-check Automatic Metric
-Enter in "1" for new metric
(optional) enter in a higher metric for the other adapter. I recommend 10 as a baseline, but you can go higher.

Verify new settings on InterfaceMetric using Command Line
-Type: netsh interface ip show address

Make sure your Metrics reflect the changes made and you are finished. If they haven't changed release/renew to see changes.

The following table lists the link speeds and metrics for computers that run Windows XP Service Pack 2.

Link Speed

Metric

Greater than 200 Mb

10

Greater than 80 Mb, and less than or equal to 200 Mb

20

Greater than 20 Mb, and less than or equal to 80 Mb

25

Greater than 4 Mb, and less than or equal to 20 Mb

30

Greater than 500 Kb, and less than or equal to 4 Mb

40

Less than or equal to 500 Kb

50

24Nov/100

Force Application to use one network connection

There is an application called ForceBindIP that allows you to bind certain applications to network connections. It doesn't work for all applications, but most of them. It is also a bit glitchy in Vista and 7.

Download ForceBindIP

Write down your IP Addresses. I use a wired and wireless connection.
-Run -> cmd
-ipconfig

Modify your Application shortcut's target window
-Add forcebindip ipaddress in front of "C:\applicationpath\executable.exe"

Enjoy!

12Nov/100

Finding Exchange Server Version (Service Pack)

There is a couple different methods to finding the version of your exchange server.

File System %Program Files%\Microsoft\Exchange Server\bin folder (different for 2003) and right click store.exe -> Detail Tab -> Version
-------OR--------
Exchange Management Console Go to Server Configuration -> Hub Transport -> Look at Version column (Exchange 2007)
-------OR--------
Exchange Management Shell type get-exchangeserver

Write down the Version number and find it on this list. It will provide you with the proper service pack and date of exchange server.
Microsoft Exchange 2000 Server.................6.0.4417
October 2000
Microsoft Exchange 2000 Server (a)............6.0.4417
January 2001
Microsoft Exchange 2000 Server SP1...........6.0.4712
July 2001
Microsoft Exchange 2000 Server SP2...........6.0.5762
December 2001
Microsoft Exchange 2000 Server SP3...........6.0.6249
August 2002
Microsoft Exchange 2000 Server post-SP3....6.0.6487
September 2003
Microsoft Exchange 2000 Server post-SP3....6.0.6556
April 2004
Microsoft Exchange 2000 Server post-SP3....6.0.6603
August 2004
Microsoft Exchange 2000 Server post-SP3....6.0.6620.5
March 2008
Microsoft Exchange 2000 Server post-SP3....6.0.6620.7
August 2008
Microsoft Exchange Server 2003................6.5.6944
October 2003
Microsoft Exchange Server 2003 SP1..........6.5.7226
May 2004
Microsoft Exchange Server 2003 SP2..........6.5.7638
October 2005
Microsoft Exchange Server 2003 post-SP2...6.5.7653.33
March 2008
Microsoft Exchange Server 2003 post-SP2...6.5.7654.4
August 2008
Microsoft Exchange Server 2007 ...............8.0.685.24 or 8.0.685.25
December 2006
Microsoft Exchange Server 2007 SP1..........8.1.0240.006
November 2007
Microsoft Exchange Server 2007 SP2..........8.2.0176.002
August 2009
Microsoft Exchange Server 2007 SP3..........8.3.0083.006
June 2010
Microsoft Exchange Server 2010................14.00.0639.021
October 2009
Microsoft Exchange Server 2010 SP1..........14.01.0218.015
August 2010

10Nov/100

Tarpitting in Exchange 2007 (Tarpit SMTP Receive Connectors)

In Exchange 2003 you needed to set the tarpit for exchange manually, but in Exchange 2007 you don't have to. It defaults to a 5 second tarpit on all receive connectors. Since tarpits reduce spam, it may be a good idea to increase it in Exchange 2007. My personal preference is 10 seconds.

Syntax:
Get-ReceiveConnector | Select Name,TarpitInterval
You can also pipe it to all your connectors at the same time using this command:
Get-ReceiveConnector | Set-ReceiveConnector -tarpitinterval 00:00:10

3Nov/100

Grow Database File in SQL

I use both SQL Express 2005 on a server and SQL 2008 on another server. The following script is nice to manually grow a file. By default, SQL auto-grows database files by 10% when it runs low on space. In most cases this is fine, but I'm a perfectionist and hate receiving errors about low DB Space in my SCE (System Center Essentials) console.

use OperationsManager
declare @dbname nvarchar(300)
declare @dbsize dec(15)
declare @UsedSpace dec(15)
declare @FreeProc int
set @dbname=REPLACE(db_name(),'''','''''')
EXEC('DBCC UPDATEUSAGE ('''+@dbname+''')')
set @dbname=QUOTENAME(@dbname)
select @dbsize = sum(convert(dec(15),size))
from dbo.sysfiles
where (status & 64 = 0)
select @UsedSpace=sum(convert(dec(15),reserved))
from sysindexes where indid in (0, 1, 255)
select @dbsize,@UsedSpace
select @FreeProc=((@dbsize-@UsedSpace)*100)/@dbsize
--If free under 20%, grow database by 20%
--The first datafile is used
if @FreeProc<20 begin
declare @filename nvarchar(300)
declare @bytesperpage dec(15)
declare @pagesperMB dec(15)
declare @newsize dec(15)
select @filename=(select top 1 [name] from dbo.sysfiles where (status & 64 = 0) order by groupid,fileid)
set @filename=REPLACE(rtrim(@filename),'''','''''')
select @bytesperpage = [low]
from master.dbo.spt_values
where number = 1 and type = 'E'
set @pagesperMB = 1048576 / @bytesperpage
set @newsize=(@dbsize*12/10)/@pagesperMB
exec('ALTER DATABASE '+@dbname+' MODIFY FILE (NAME = N'''+@filename+''', SIZE = '+@newsize+')')
end

2Nov/101

Updates Keep failing in Windows Vista / 7 “updates were not configured correctly reverting changes”

I recently ran into a computer that was constantly failing all updates. Here is what I did to fix this issue.

  1. Run registry cleaner to remove orphaned registry entries. My recommendation is to download CCleaner
  2. Run the following commands as an Administrator from command line or Alternatively you can download Updatefix.bat (I Created This)
  3. cd /d %SystemRoot%\System32\SMI\Store\Machine
    attrib -s -h *
    del *.blf
    del *.regtrans-ms

  4. Reboot your computer. The deleted files are regenerated and you can now install windows updates.