Category Archives: Microsoft

All Microsoft Products (Exchange, SQL, Windows, Server)

Migrate to new DHCP Server Microsoft

Export the DHCP database from Windows 2003:

1.                   On the Windows 2003 DHCP server, navigate to a command prompt

2.                   Type the following Command: netsh

3.                   Type the following Command: DHCP

4.                   Type the following Command: server <\\Name or IP Address>

5.                   Type the following Command: export c:\w2k3DHCPdb all

Note You must have local administrator permissions to export the data.

Import the DHCP database

1.       Copy the exported DHCP database file to the local hard disk of the Windows Server 2008-based computer.

2.       Install the DHCP Role on the server.

3.       Stop the DHCP server service on the server.  To do this, follow these steps:

a.       Log on to the target DHCP server by using an account that is a member of the local Administrators group.

b.      Click Start, click Run, type cmd in the Open box, and then click OK.

c.       At the command prompt, type net stop DHCPserver , and then press ENTER. You receive a “The Microsoft DHCP Server service is stopping. The Microsoft DHCP Server service was stopped successfully” message.

d.      Type exit, and then press ENTER.

4.       Delete the DHCP.mdb file under c:\windows\system32\DHCP folder.

5.       Start the DHCP server service.

6.       Right-click on the Command Prompt (cmd) and select run as administrator, to open the cmd prompt using elevated privileges.

Note You must have local administrator permissions to import the data.

7.       Type the following Command: netsh

8.       Type the following Command: DHCP

9.       Type the following Command: server <\\Name or IP Address>

10.   Type the following Command: import c:\w2k3DHCPdb

11.   Restart DHCP and verify the database has moved over properly.

Transfer FSMO Roles

Transfer the Schema Master Role

Use the Active Directory Schema Master snap-in to transfer the schema master role. Before you can use this snap-in, you must register the Schmmgmt.dll file.

Register Schmmgmt.dll

  1. Click Start, and then click Run.
  2. Type regsvr32 schmmgmt.dll in the Open box, and then click OK.
  3. Click OK when you receive the message that the operation succeeded.

Transfer the Schema Master Role

  1. Click Start, click Run, type mmc in the Open box, and then click OK.
  2. On the File, menu click Add/Remove Snap-in.
  3. Click Add.
  4. Click Active Directory Schema, click Add, click Close, and then click OK.
  5. In the console tree, right-click Active Directory Schema, and then click Change Domain Controller.
  6. Click Specify Name, type the name of the domain controller that will be the new role holder, and then click OK.
  7. In the console tree, right-click Active Directory Schema, and then click Operations Master.
  8. Click Change.
  9. Click OK to confirm that you want to transfer the role, and then click Close.

Transfer the Domain Naming Master Role

  1. Click Start, point to Administrative Tools, and then click Active Directory Domains and Trusts.
  2. Right-click Active Directory Domains and Trusts, and then click Connect to Domain Controller.

    NOTE: You must perform this step if you are not on the domain controller to which you want to transfer the role. You do not have to perform this step if you are already connected to the domain controller whose role you want to transfer.

  3. Do one of the following:
    • In the Enter the name of another domain controller box, type the name of the domain controller that will be the new role holder, and then click OK.

      -or-

    • In the Or, select an available domain controller list, click the domain controller that will be the new role holder, and then click OK.
  4. In the console tree, right-click Active Directory Domains and Trusts, and then click Operations Master.
  5. Click Change.
  6. Click OK to confirm that you want to transfer the role, and then click Close.

Transfer the RID Master, PDC Emulator, and Infrastructure Master Roles

  1. Click Start, point to Administrative Tools, and then click Active Directory Users and Computers.
  2. Right-click Active Directory Users and Computers, and then click Connect to Domain Controller.

    NOTE: You must perform this step if you are not on the domain controller to which you want to transfer the role. You do not have to perform this step if you are already connected to the domain controller whose role you want to transfer.

  3. Do one of the following:
    • In the Enter the name of another domain controller box, type the name of the domain controller that will be the new role holder, and then click OK.

      -or-

    • In the Or, select an available domain controller list, click the domain controller that will be the new role holder, and then click OK.
  4. In the console tree, right-click Active Directory Users and Computers, point to All Tasks, and then click Operations Master.
  5. Click the appropriate tab for the role that you want to transfer (RID, PDC, or Infrastructure), and then click Change.
  6. Click OK to confirm that you want to transfer the role, and then click Close.

Windows Firewall Base Filtering Engine Services

Had a client computer that could no longer connect to the VPN. The end-user blamed IT for changing something as it “worked before your scheduled weekend updates”. Yeah.

Turns out this guy had a rootkit, a trojan, and some malware on his system. Shame on IT for not catching it sooner, but it didn’t spread anywhere else.

Combofix, malwarebytes, TDSS, and stinger later, I was convinced we got it off of his system. Unfortunately he could still not connect due to the Base Filtering Engine service and the Windows Firewall service being unable to start. Cisco’s anyconnect client requires these two services in order to perform the necessary handshaking for a secured VPN connection.

Found these two kick butt registry keys to fix the situation:
http://it.thelibrarie.com/utilities/firewall.reg.txt
http://it.thelibrarie.com/utilities/bfe.reg.txt

Obviously change them to .reg files and run. I generally edit them to see what they do before blindly installing registry keys from a random IT site.

List AD User Information CSV

I needed to list all users and their creation dates to verify that they were in the correct groups.

Script here

You need to edit the two spots:
objConnection.Open “DOMAINCONTROLLER”
“SELECT Name, profilePath, homeDrive, distinguishedName,userAccountControl FROM ‘LDAP://dc=DOMAIN,dc=LOCAL’ WHERE objectCategory=’user'”

Devcon For Windows x64

Had a system with Windows 7 x64 (64 bit) and I wanted to be able to run devcon on the system. Devcon basically allows command line interfacing instead of using the device manager GUI. This means I could write up a quick batch file to restart the wireless interface (the entire reason I wanted it to work).

Looks like Microsoft allows you to download an old version that works with x32 and ia64 systems, but not x64. The x32 version did not work with my 64bit windows 7 install – probably because the hardware is using all 64bit drivers. In order to download the newest version, they make you install the entire Windows Developer Kit in order to utilize this one tool. Sure, there are ways to extract it, but talk about a PITA.

Fortunately this guy (http://munashiku.slightofmind.net/20090621/sometimes-64-bit-is-a-pain) decided it would be awesome to host the files I needed without requiring that much thought. I’ll put them up in the utilities area sooner or later just in case.

DevCon x64

RDP Stops Working After SP1 2008 R2

I was finishing up my SP1 rollouts on server 2008 R2 when a couple employees were complaining they could no longer RDP into the servers. Brief check of the eventlog showed:

Message = Faulting application name: svchost.exe_TermService, version: 6.1.7600.16385, time stamp: 0x4a5bc3c1
Faulting module name: rdpcorekmts.dll, version: 6.1.7600.16952, time stamp: 0x4f1f9e66

Well that’s no good.

What I ended up doing was:
services.msc
remote desktop services – set this to automatic and change to always attempt to restart the service if a crash happened.

Is this the most correct way? Probably not, but it worked for me.

http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/f5855b60-f29c-4c90-b364-e364589e5267

Error 800F0818 SP1 Install

I was trying to upgrade a few 2008 R2 servers to SP1. Two of the three were successful without any issues. The third gave me some trouble – so I found a way to fix it.
Fast forward a couple more weeks and I upgraded a pair of identical 2008 R2’s to SP1. One success. One Failure. So now here’s my documentation (lot of help from http://jasonduffett.net/post/5189439239/windows-2008-r2-service-pack-1-error)

Download and run this file:
http://www.microsoft.com/downloads/en/details.aspx?FamilyId=c4b0f52c-d0e4-4c18-aa4b-93a477456336&displaylang=en

Open the log file:
C:\windows\logs\cbs\checksur.txt
Scroll to the bottom where it says “Unavailable repair files”
We want to know the servicing\packages\PACKAGENAME

Take ownership
takeown /f c:\windows\servicing\packages\PACKAGENAME.cat
takeown /f c:\windows\servicing\packages\PACKAGENAME.mum

Grant permissions
icacls c:\windows\servicing\packages\PACKAGENAME.cat /grant administrators:F
icacls c:\windows\servicing\packages\PACKAGENAME.mum /grant administrators:F

Copy from another system
copy \\anothersystem\c$\windows\servicing\packages\PACKAGENAME.cat "c:\windows\servicing\packages\"
copy \\anothersystem\c$\windows\servicing\packages\PACKAGENAME.mum "c:\windows\servicing\packages\"

Re-run the assessment installer tool.
Re-run the sp1 installation.
Profit