WDS PXE-E32: TPT open timeout

If you have a Windows Server 2008 (R2) running Windows Deployment Services and DNS and you receive error WDS PXE-E32: TFTP open timeout, this is probably caused by the DNS service binding to the WDS UDP ports on the server.

This will generally occur after installing security update MS08-037.

You can solve this by following this procedure:

Start Registry Editor. To do this, click Start , type regedit in the Search box, and then press Enter.

  • Navigate to the following key:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\WDSServer\Parameters
  • Right-click UdpPortPolicy, and then click Modify.
  • In the Value data box, type 0, and then click OK.
  • Close the registry editor
  • restart the Windows Deployment Services.

Rename a computer to based on Asset Tag or Serial number

To rename a computer based on its Asset Tag/Serial number using a script, you can put the following text in a vbs file. I use NL-AMS-WS- preceding the Asset tag to indicate the country (netherlands), city (Amsterdam) and type (Workstation):

'***********************************************************************
'
' Changes the computer name to the computer's serial number/asset tag.
'
'***********************************************************************

strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

'Part 1 - Acquire serial/service tag number
Set colSMBIOS = objWMIService.ExecQuery ("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
  strSN = objSMBIOS.SerialNumber
  If strSN <> "" Then exit For
Next

'Part 2 - Assign computer name to serial/service tag number
Name = "NL-AMS-WS" & strSN

Set colComputers = objWMIService.ExecQuery ("Select * from Win32_ComputerSystem")

For Each objComputer in colComputers
    err = objComputer.Rename(name)

if err <> 0 then
wscript.echo "There was an error renaming the machine. Please restart, and try again."
else
wscript.echo "Machine successfully renamed: " & Name
end if

Next

To use this during deployment you can use the following command:

cscript scriptname.vbs

Delete a folder with too many characters in its name.

If you want to delete a folder and it gives you the error message: ‘Path is too long’, you can simply keep digging into the folder untill you find a point where it doesn’t give you the error anymore, or you can create a batch file containing the following text:

@echo off
if {%1}=={} @echo Syntax: DelFolder FolderPath&amp;goto :EOF
if not exist %1 @echo Syntax: DelFolder FolderPath - %1 NOT found.&amp;goto :EOF
setlocal
set folder=%1
set MT="%TEMP%\DelFolder_%RANDOM%"
MD %MT%
RoboCopy %MT% %folder% /MIR
RD /S /Q %MT%
RD /S /Q %folder%
endlocal

This script uses RoboCopy, which is included in the Microsoft Windows Server 2003 Resource Kit and can be downloaded here. It is included in Windows 7.

Rename the Administrator account using the command line

To rename the Administrator account (or any existing account) in Windows 7 using the command line, execute the following command:

wmic useraccount where name='Administrator' call rename name='newname'

Install AD-DS Tools

To install AD-DS Tools in Windows 7, execute the following command:

cmd.exe /c dism /Online /Enable-Feature /FeatureName:RemoteServerAdministrationTools /FeatureName:RemoteServerAdministrationTools-Roles /FeatureName:RemoteServerAdministrationTools-Roles-AD /FeatureName:RemoteServerAdministrationTools-Roles-AD-DS /FeatureName:RemoteServerAdministrationTools-Roles-AD-DS-SnapIns /NoRestart

Disable Windows Firewall

To disable the Windows Firewall in Windows 7 execute the following command:

cmd.exe /c netsh firewall set opmode mode=DISABLE profile=DOMAIN

Disable IPv6

To disable IPv6 in Windows 7 execute the following command:

cmd.exe /c reg add HKLM\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters /v DisabledComponents /t REG_DWORD /d 0xffffffff /f

Configure Subsystem for UNIX-based Application

To configure Subsystem for UNIX-based Application in Windows 7 enter the following command:

cmd.exe /c start /w pkgmgr /iu:SUA

Enable Remote Registry

To enable the Remote Registry enter the following command:

cmd.exe /c sc config RemoteRegistry start= auto

Allow multiple terminal sessions in Windows Vista SP1

One of the many flaws in Windows Vista is that you cannot set up more then one RDP session to it. There is a quite simple solution to it.

Download this zip file and extract it. Go into the folder and open the folder that represents the architecture of your system (x86 or x64). In there you will find some batch files. Select the version of your Vista installation and run it as Administrator. It will backup and replace some files in the system directory, edit some registry settings and will restart the terminal services service. That’s all there is to it.

Of course this isn’t supported by Microsoft.