Hello and Welcome

Featured

Hello, and welcome to this little blog I’ve decided to try. It’s probably going to contain what I think is useful bits and pieces, mostly to do with computer stuff, with problems and solutions I come across during work.

It will also serve as a handy resource for myself instead of writing things down in notepads, or having a load of shortcuts to internet pages on my desktop!!

I really should put in a disclaimer stating the methods shown within this blog worked for me; it may not work for everyone so please take care as I can’t be held responsible for anything that goes wrong. It should be used for guidance purposes. Any links shown are what I used for guidance and I can’t take ownership for their content or accuracy.

Changing Drive Letters during Server 2008 R2 Sysprep

Another issue I’ve discovered with using Sysprep in Server 2008 R2 is that the drive letter for CD-ROM drive defaults back to D: after being changed to Z: during the gold build.

Simple solution is to create script file for DISKPART and have this run during the final stages of Sysprep.

Before running Sysprep on the server:

  1. First, create a new text file named Drives.txt – I suggest placing it in the folder C:\Windows\Setup\Scripts
  2. Edit this file and add the following lines:
    1. select volume 0
      assign letter z noerr
    2. Please note: the volume number may change depending on the number of drives the server has. The drive letter ‘Z’ can also be changed to whatever you wish.
  3. Edit the file in the folder C:\Windows\Setup\Scripts called setupcomplete.cmd
  4. Add the following line to the end of the file:
    1. diskpart /s C:\Windows\Setup\Scripts\drives.txt
  5. Save the file.
  6. Run Sysprep.

The following site used for reference (this is for Server 2003):

http://thebackroomtech.com/2009/10/15/howto-automatically-change-the-cd-rom-drive-letter-after-running-sysprep/

WSUS 3.0 SP2 Not Synchronising

I recently tried to manually sync my WSUS 3.0 SP2 server to the upstream Microsoft servers. The last time it was online was in Nov-2012 where it synchronised successfully, but now each time I try, I receive the following error:

Result: An http error occurred:

WebException: The request failed with the error message:

— <html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href=”%2fmicrosoftupdate%2fv6%2ferrorinformation.aspx%3ferror%3d15″>here</a>.</h2></body></html>

–.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.UpdateServices.ServerSyncWebServices.ServerSync.ServerSyncProxy.GetAuthConfig() at Microsoft.UpdateServices.ServerSync.ServerSyncLib.InternetGetServerAuthConfig(ServerSyncProxy proxy, WebServiceCommunicationHelper webServiceHelper)
at Microsoft.UpdateServices.ServerSync.ServerSyncLib.Authenticate(AuthorizationManager authorizationManager, Boolean checkExpiration, ServerSyncProxy proxy, Cookie cookie, WebServiceCommunicationHelper webServiceHelper)
at Microsoft.UpdateServices.ServerSync.CatalogSyncAgentCore.SyncConfigUpdatesFromUSS()
at Microsoft.UpdateServices.ServerSync.CatalogSyncAgentCore.ExecuteSyncProtocol(Boolean allowRedirect)

In order to resolve this, I had to download an Update for WSUS 3.0 SP2 (KB2734608) from the following Microsoft website and install it on the WSUS server:

http://www.microsoft.com/en-us/download/details.aspx?id=30748

Once the update had installed, I reopened the WSUS console, tried a manual sync and it was successful.

Normally such updates would be applied via WSUS but because I was unable to synchronise it meant a manual download and install from MS.

Install ESXi 4.0 from a USB Pen

Normally I would install ESXi by burning the ISO to CD and install via CD, however I came across a server the other day that did not have a built-in CD drive, and no external USB CD drive was available.

Solution?

Run the ESXi installer from a USB pen!

What’s required:

  • USB Pen (at least 500mb in capacity).
  • ESXi 4.0 ISO.
  • SYSLINX Boot Loader (v3.86 worked for me).

In this example, USB pen drive letter is G:

  1. Insert and format the USB pen using FAT32.
  2. Download the following SYSLINX: http://www.kernel.org/pub/linux/utils/boot/syslinux/3.xx/syslinux-3.86.zip
  3. Extract the ZIP file.
  4. Open a command prompt window (right-click and Run As Admin).
  5. Navigate to the location of the extracted zip file EG cd c:\syslinux-3.86
  6. Navigate to the WIN32 folder: cd win32
  7. Type: syslinux -fma G:
  8. Once complete, extract the contents of the ESXi ISO file to the USB pen.
  9. Rename the following two file: isolinux.bin to syslinux.bin and isolinux.cfg to syslinux.cfg.
  10. Eject the USB pen and insert into the server.
  11. Boot from USB on the server and install ESXi.

The following websites were referenced:

http://www.vm-help.com/esx40i/ESXi_USB_install.php

http://simon.rozman.si/computers/virtual/install-esxi4-from-usb-drive (very good!)

http://www.syslinux.org/wiki/index.php/The_Syslinux_Project

DNS Scripting (DNSCMD)

As well as using scripts for Active Directory, it is also possible to script the creation and deletion of objects in DNS using the DNSCMD command.

A basic guide on creating DNS records using DNSCMD and VBScript:
http://codeidol.com/community/ad/creating-and-deleting-resource-records/2244/

VBscripts for managing DNS:
http://www.activexperts.com/network-monitor/windowsmanagement/adminscripts/networking/dns/

This site also has a good section on using DNSCMD (Cheat Sheet):
http://www.minasi.com/newsletters/nws0803a.htm

Some examples using DNSCMD of my own:

Delete a forward lookup zone:
dnscmd DC1 /ZoneDelete domain1.com /DsDel /f

Delete a reverse lookup zone:
dnscmd DC1 /ZoneDelete 0.168.192.in-addr.arpa. /DsDel

Delete a Host (A) Record from the domain zone:
dnscmd DC1 /RecordDelete domain.com SVR1 A /f

Delete a Name Server Record from the domain:
dnscmd DC1 /RecordDelete domain.com @ NS dc2.domain.com /f

Active Directory VBScripting

Every now and then you may need to write a little script to automate a task or two in Active Directory. If you’re like me and not very good with the old VBscripting, there are some sites I’ve found below that can give you a helping hand in getting started.

As with all scripts, you should test them in a test/isolated network to make sure they do what you expect before deploying them onto a production network.

Scripts to Manage Active Directory Users:
http://www.activexperts.com/network-monitor/windowsmanagement/adminscripts/usersgroups/users/

Scripts to Manage Active Directory Groups:
http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/usersgroups/groups/

Further Active Directory VBScripting:
http://www.computerperformance.co.uk/vbscript/index.htm

One final VBScripting site that’s very good:
http://www.wisesoft.co.uk/scripts/active_directory/vbscript.aspx

Removing a Windows 2003 Domain Controller

Occasionally, I have had to remove a domain controller out of the domain, for example, if it is no longer being used. If it was left, errors are seen in event logs, etc as other domain controllers will still try to replicate to it.

So, there are two ways to remove a domain controller: a GRACEFUL removal, and an UNGRACEFUL removal.

Before removing a domain controller though, you should bear in mind certain considerations. Check out this link for further information: http://www.msresource.net/knowledge_base/articles/how_to:_remove_a_windows_2000_domain_controller_from_the_domain.html

A graceful removal is when the server still powers up and is still connected to the network, and can also be logged onto.
This can be done using the DCPROMO to demote the server from a DC back into a member server.

An ungraceful removal is when the server cannot be started in a normal manner, is no longer on the network, or has suffered an unrecoverable error. The removal of a domain controller can be done using the NTDSUTIL command to remove and clean up the metadata. See the following website for more detailed information on Performing a Metadata Cleanup: http://www.petri.co.il/delete_failed_dcs_from_ad.htm

NTDSUITL can also be automated or scripted like the example below:

ntdsutil “metadata cleanup” “connections” “connect to server dc1” q “select operation target” “list domains” “select domain 0” “list sites” “select site xx” “list servers in site” “select server 0” q “remove selected server” q q

For more info on automating NTDSUTIL see: http://support.microsoft.com/kb/243267

Upgrade SQL 2005 Express to SQL 2005 Standard or Enterprise

Following on from a previous post regarding MOSS 2007 and the 4GB database limit, I should also mention that it is possible to upgrade an existing SQL 2005 Express instance to SQL 2005 Standard or Enterprise. This may be useful if you don’t wish to do a complete re-install of MOSS.

Quite simply:

  • Insert your SQL 2005 Standard/Enterprise CD into the drive.
  • Open a command prompt and change to the CD drive: z:
  • Enter the Servers folder: cd servers
  • Type setup.exe SKUUPGRADE=1
  • This will begin the SQL 2005 server setup.
  • Proceed through the setup wizard until you come to the Component to Install page.
  • Ensure the SQL Server Database Services box is at least ticked.
  • Continue with the setup wizard.
  • When at the Instance Name, click the Installed Instances button found towards the bottom.
  • Highlight the instance named SQL Server (OFFICESERVERS) and click OK.
  • After clicking Next, it may show the Existing Componets page. Place a tick in the box for SQL Server Database Services.
  • Continue with the install wizard.
  • Once complete, perform an iisreset.

http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=55