Archive

Archive for the ‘Windows’ Category

Target Principal Name is Incorrect

June 25, 2009 Leave a comment

A few weeks ago I was given the task to expand the D drive on a client’s file server (FP01), which is also a domain controller and Windows Server 2003 R2 Standard SP2. The FSMO roles were on DC01. The C and D drive were on the same RAID 5 array and part of the brief was to remove the RAID 5 array and create a single RAID 1 for the OS (C Drive) and a RAID 5 for the Data (D Drive). I ghosted both partitions to a portable HDD, created the arrays and ghosted back, expanding the D drive of the server. All went well except for the following messages in the event log.

* Active Directory was restored using an unsupported manner. netlogon service is stopped.
* Naming information cannot be located because: The target principle name is incorrect whenever AD users and computers is run
* Event ID 4, Kerberos client received a KRB_AP_ERR_MODIFIED error

After researching this to death the following was what I did to fix the problem.

1. Stop the Key Distribution Center (KDC) service on FP01.
Open a Command Prompt, type net stop KDC, and press Enter.

2. Install the Server 2003 support tools if not loaded already and launch Kerbtray.exe.
Click Start, Run, and then type kerbtray.exe and press Enter.
A little green ticket icon will appear in your system tray.

Note: At this point I launched the kerbtray application and noticed duplicate tickets issued to FP01.

3. Purge the ticket cache on FP01.
Right-click the green ticket icon in your system tray, and then click Purge Tickets.
You should receive a confirmation that your ticket cache was purged. Click OK.

4. Reset the Server domain controller account password on DC01 (the PDC emulator).

Open a command prompt and type: netdom /resetpwd /server:FP01 /userd:domain.com\administrator /passwordd:password, and then press Enter.

5. Synchronize the domain.
Open a command prompt, type repadmin /syncall, and then press Enter.

6. Start the KDC service on FP01. To do so, open a command prompt, type
net start KDC, and press Enter. This completed the process, and the domain
controllers were replicating successfully.

Printer Migration Script

December 16, 2008 Leave a comment

On a number of occasions I have had to migrate Windows Print servers.  This task is easy using Printmig, a little free application provided by Microsoft that allows you to backup all the print queues, drivers and settings and restore them to a new server.  The challenge arises when you want to update the client PCs as well, especially when you have many to do.

There are a number of scripts available on the net for this and here is the one I have found very useful.  It obtains the list of all the printers installed on the client, deletes them all and remaps them to the new print server.

    On Error Resume Next
    Dim strComputer
    Dim objWMIService
    Dim colItems
    Dim WshNetwork

    Set WshNetwork = WScript.CreateObject(“WScript.Network”)

    strComputer = “.”
    Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”)
    Set colItems = objWMIService.ExecQuery(“Select * from Win32_Printer”,,48)
    For Each objItem in colItems
        If objItem.ServerName = “\\OLDSERVER” then
            WshNetwork.RemovePrinterConnection objItem.ServerName & “\” & objItem.ShareName, true, true
            WshNetwork.AddWindowsPrinterConnection “\\NEWSERVER\” & objItem.Sharename
        End If
    Next

Categories: Windows

Slip-Streaming a Service Pack

June 24, 2008 Leave a comment

On many occasions I have had the need to integrate a service pack into a Windows source directory.  Here’s how you do it:

Copy the Windows source i386 directory from the installation CD to a folder on your server.  (e.g. C:\support\i386)
Download the service pack that you just installed to a different directory on the server. (e.g. C:\temp\win2k3sp2)
The service pack that you download will be a compressed .exe file.  Extract this to the the folder that was just created. (C:\temp\win2k3sp2)
This can be done with 7-zip or Winrar, etc.

After you have extracted the service pack you can integrate it with the i386 source on your C:\support\i386 directory.
To do this open a command prompt and type the following:

c:\temp\win2k3sp2\i386\update\update.exe -s:c:\support

Note: You do not need to add the i386 portion of the path into this command

A dialog box will open up stating that an update of the source files has occurred.
Once complete, you can now safely add Windows components, such as IIS without having to re-apply the service pack afterwards.

Re-Registering ASP .NET

June 24, 2008 Leave a comment

If IIS was installed on a server after .NET 2.0 was installed, you must re-register ASP.NET 2.0 for IIS to have the Web Service Extensions.  You can manually create the web service extension, but this way is much easier.

1. Open a command prompt.
2. Navigate to %WINDIR%\Microsoft.net\framework\V2.0.50727
3. Type aspnet_regiis.exe –i to re-register ASP.Net 2.0

These instructions are valid for ASP .NET 2.0, but the process is the same for .NET 3.0, just navigate to the appropriate .NET folder and run the command.

Categories: Windows Tags: