Windows

windows 2000 - ITMU / Windows Update Issues

Get this when doing a windows update - Error number: 0xC8000408

First check the basics, ensure that windows update is a trusted site and the seucirty level is set corretely within the Zone - test with lower secuirty to see if that resolves the problem.

If that doesnt work try the following; 1) Added the user SYSTEM with every privilege to C: and subs 2) Stopped the “Automatic Updates” service 3) Renamed the C:\WINNT\SoftwareDistribution folder 4) Started the “Automatic Updates” service again

SCCM - installing client via GPO

If you dont have sms / sccm client in your gold disk then GPO is the next best thing to get the SCCM client out into your environment.

This is a real nice and clean install script for IE 7 which i have modified to install SCCM. http://www.symantec.com/connect/blogs/installing-application-using-vbscript

object.Run(strCommand, [intWindowStyle],[bWaitOnReturn])  

'INSTALL MS INTERNET EXPLORER 7 USING VBScript    
Set objShell = WScript.CreateObject("WScript.Shell")
spath = objShell.CurrentDirectory

If fso.FileExists(spath & "\IE7-WindowsXP-x86-enu.exe") Then
	path = """" & spath & "\IE7-WindowsXP-x86-enu.exe" & """ /passive /norestart /update-no"
	objShell.Run(path, 1 ,True)
	i = 0
	'INSTALL MICROSOFT INTERNET EXPLORER 7    
	i = objShell.Run(path, 1 ,True)
	If (i = 0) Or (i = 3010) Then 
		'WRITE EXIT CODE [0-success/3010-success&requires reboot] TO EVENTLOG
		objShell.LogEvent vbLogSuccess, sLogHeader & "Microsoft Internet Explorer 7 installation completed successfully." & VbCrLf & "Exit code: " & i
	Else
		MsgBox "The installation of Microsoft Internet Explorer 7 returned an error: " & i & VbCrLf & _
		"Please contact IT Support to report this error.", vbOKOnly
		objShell.LogEvent vbLogError, sLogHeader & "Installation returned failure code: " & VbCrLf & "Exit code: " & i
	End If

Else
	WScript.Quit (1)
End If

set fso = Nothing
set WSHShell = Nothing
Wscript.Quit

Using W2k3 R2 / W2k8 server as a NFS share for vmware

This is something i do in the lab so all of my vm’s are able to access iso’s etc (very handy for quick builds). Quite handy doing it through windows since its easiey enough to setup a windows network share to the same location and update various files via that.

This site has some good clear instructions : http://vmetc.com/2008/02/19/create-a-nfs-share-for-vm-iso-files-with-windows-2003-server-r2/

  1. On the Windows 2003 Server make sure “Microsoft Services for NFS” in installed. If not you need to add it under Add/Remove Programs, Windows Components, Other Network File and Print Services
  2. Next go to folder you want to share and right-click on it and select Properties
  3. Click on the NFS Sharing tab and select “Share this Folder”
  4. Enter a Share Name, check “Anonymous Access”
  5. In VirtualCenter, select your ESX server and click the “Configuration” tab and then select “Storage”
  6. Click on “Add Storage” and select “Network File System” as the storage type
  7. Enter the Windows Server name, the folder (share) name and a descriptive Datastore Name
  8. Done. Now you can map CD iso’s to your various vm’s.

 

True Image - Machine cannot log into domain

I’ve used true image for testing packages etc then reverting back to a standard image for further testing. But there can be a problem if the machine updates it domain password then you revert back to the original image. It will not let you logon to the domain if the passwords don’t match.

The way to prevent this is to disable password update so that hte machine does not change its password as per the domain policy.

DHCP Client - Error 5: Access is denied.

I’ve had this on a few windows 2003 machines, where the “DHCP client” service refuses to start and prompts with an access denied window.

Unsure of the cause at this point (it may be a security patch), but here is the fix…

Give the local “network service” account full rights to the following registry key;

hkey_local_machine\system\currentcontrolset\services\dhcp

Now try starting the service, should work. In some cases you may also need to add the rights to the following key..

McAfee - Setting ePO via client package

I’ve been doing a bit of work recently on McAfee 8.7i enterprise and ePO 4. I wanted to push out the McAfee client via SMS straight after a gold disk build…

First you need to export the repository sitelist.xml and the various keys from your ePO server…

The security keys must be located in the same folder as the site list. Use ePolicy Orchestrator to export the files:

  1. Export the siteinfo file:

    1. Select Software | Master Repository.
    2. Click Export Sitelist.
    3. Save the file to a new location.
  2. Export the security keys:

  3. Select Configuration | Server Settings | Security Keys, and click Edit.

  4. Select Master Agent-server secure communication key, and click Export.

  5. Save the files to the same location as the siteinfo file.

WPAD - Web Proxy Autodiscovery Protocol

When using wpad there are some things that you should take note of;

  • DHCP wpad will override DNS wpad
  • DHCP 252 option can in some cases be slightly slower to resolve than DNS - there may be a patch for WinInet to resolve this.
  • You should always use lower case - wpad.dat  (it is case sensitive)
  • DHCP will allow either a URL or a file location for wpad.dat

Within IE on the LAN settings tab if you have WPAD “automatically detect settings” enabled and also configure a proxy server the WPAD should override the manual proxy configuration.

Windows Cluster - removing orphaned .dll file

Recently i uninstalled scanmail off an exchange 2007 cluster environment but had issues when trying to reapply a newer version. The problem was related to an orphaned .dll file that scanmail had left behind, seems the uninstall was not as clean as i had hoped.

Within the cluster management MCC the cluster appears in a partially active state. If you go to cluster resource types you can see the .dll that hasn’t loaded properly (the orphaned file). To remove this issue make a note of the .dll that is not loading and its display name. Drop to a CMD and type the following…

sntp - fixing time issues within a windows domian

I’ve had some problems with dcdiag failing on the advertising check, and this relates back to the DC not getting its time from the PDCE properly.

Fixing timesync is different according to the machine type…

If it’s a standard Domain Controller then behave as if its a member server (below)

If it’s a PDCEmulator then make sure you allow port 123TCP/UDP outbound on your firewall and configure the external sntp site by entering this at the command line  (note: i use pool.ntp.org instead of default microsoft sntp)

Offine Files - Remove prompt about excluded files error

You may get an error such as this popup during a offline files sync…

Offline files (\\server\share on server): Unable to make ‘archive.pst’ available offline on \\server\share\folder. Files of this type cannot be made available offline.

Microsoft have said that even if the file is in the excluded list then by design offline files will still complain about it when it tries to sync.

There is a way to remove the warning prompt for specific files; (you may need to update your machine to the latest support pack in some cases)

Diskpart - resizing virtual machine system volumes (windows)

Diskpart works quite well extending disk sizes - …unless its the system disk that you need to extend.

Luckily in the virtual world its somewhat easier to move your disks about. This is a quick list of the steps required to increase your system disk… 

You will need to have another virtual machine available to boot into (windows 2003 etc) 

  1. Shut down the virtual machine with the system disk you wish to extend
  2. Go into virtual machine settings and increase the system drive size to what you require
  3. Now you need your spare w2k3 virtual machine or similar. While it is in a shutdown state add the system disk you wish to extend into this machine as another hard disk. Note: select “existing harddrive” and not the default option of  “new harddrive”, and point to the system drive you wish to extend (It is possible to attach this disk as long it is not on and being used) 
  4. Power up the spare machine with the newly attached hard drive (the drive you wish to extend) 
  5. Logon, open up cmd prompt and type “diskpart” 
  6. Now you need to find and select your disk. Type “list disk” to see available disk numbers (most likely the last drive letter). Then type “select disk #”   (# = the number you got from the list command)
  7. Next select the volume, similar to above type “list volume” then “select volume #”
  8. Type “extend”
  9. Type “exit” 
  10. Done - shutdown the machine and disconnect the drive you just extended. Be carefull not to DELETE the drive, you only want to disconnect it. 
  11. Now you should be able to fire up the original machine and it will have a larger system drive. 

There are obviously other 3rd party utilities to do this but this is handy to know and is actually quite fast.

Windows / Linux - File Migration Tools

In Windows i use robocopy…

This is the syntax to copy from one location to another…  (i like how robocopy uses UNC paths)

robocopy \\192.168.9.70\videos \\192.168.9.101\videos /e /r:2 /w:10 /sec robocopy \\192.168.9.70\software \\192.168.9.101\software /e /r:2 /w:10 /sec

Note: i always copy instead of the move. Run multiple times before switch over to shorten time for final sync. Always use the /SEC to copy over the NTFS permissions. I have had problems with the non X010 version of robocopy not copying NTFS permissions across. Check NTFS permissions before removing the source files. You can update files NTFS permissions with /SECFIX switch if required.

Windows - Port forwarding

Just wanted to note here that there is a tool for windows to ‘port forward’ Its a command MS ships that enables IPv6 to work on IPv4, but can be used as a port redirector…. so as long as you have IPv6 support on your box, you can do this.

syntax as follows;

netsh interface portproxy add v4tov4 listenport=443 connectaddress=targetmachine connectport=3389

so the machine above listens on 443 and redirects traffic to 3389 on targetmachine.

Corporate Firewall - SSH and port 443 goodness

Things you’ll need; (basic instructions) SSH - either Linux or Open SSH for windows (set this up first and ensure its working!). I have only used Linux, so i do not know the details of setting up a Open SSH box on windows (good luck).

Router with pinhole or port forwarding abilities. – forward your external 443 port to internal 22 on your SSH box

Putty.exe - use this to test your SSH connection locally (you should be able to connect on port 22 locally or 443 externally)

fakeRAID vs Software RAID (windows)

O.k. here is the latest from atomic magazine… I’m talking about RAID 0 (stripe) here.

Software RAID (i.e. windows stripe) is faster (both in throughput and seek time) than the “hardware” fake RAID built in to most new mother boards. Apparently it doesn’t matter about the stripe size of your raid either…. Software raid still wins??

I’m a bit skeptical about this, and will have to en devour on a few tests to conclude whether this is true or not…