Bart's Weblog

Just a blog…

Archive for June, 2008

PowerShell: How to retrieve disk size & free disk space for a list of computers (input file)

Posted by bartvdw on 1919/0606/2008

Note: works only with V2 which is currently in CTP stage!

The command below will show you a very nice overview of disk size & free space for a list of computers (input file). The great thing about PowerShell, from my point of view, is “piping” commands into 1 big command which eliminates the need to create a script for certain operations. Secondly in V2 (CTP), the “gridview” option is amazing!

Get-WMIObject Win32_LogicalDisk -filter “DriveType=3″ -computer (Get-Content c:\scripts\computers.txt) | Select SystemName,DeviceID,VolumeName,@{Name=”size(GB)”;Expression={“{0:N1}” -f($_.size/1gb)}},@{Name=”freespace(GB)”;Expression={“{0:N1}” -f($_.freespace/1gb)}} | Out-GridView

Posted in PowerShell, Scripting | 39 Comments »

Windows 2000 could not start because the following file is missing or corrupt: \WINNT\SYSTEM32\CONFIG\SYSTEMced

Posted by bartvdw on 1818/0606/2008

This was a nice message when booting a server, but not so fun actually. First of all, the “ced” at the end of the error is not really part of the message, but a formatting error from MS. What the message really is: your SYSTEM registry is missing or corrupt. Below the things I went through…

I booted using Win PE 2.0 and checked the file presence, it was there. I checked if I had some good copy in the “Repair” directory, copied it over and booted the system. The I tried to restore system state from backup. At that moment I noticed that my SYSTEM registry wasn’t fully restored… I started looking further and saw that the file was +/- 23MB, but after a restore I had only 2.3MB. So why the difference?

I then restored the system state to a different file location, to see what the file size is. That was OK! So what was happening?

After looking around a bit, I found that the SYSTEM hive shouldn’t be that large. If it’s too large, Windows 2000 will fail to boot. So question was: why is it so big? I copied over the file and started investigation. I loaded the hive in my registry and started exporting first level. This indicated all big stuff was located in “ControlSet001”; second level indicated “Enum”. Then we looked around a bit and we opened the “Root” key. We found a very long list of “LEGACY_TRISVC*” entries.

We checked is and apparently this was coming from IBM Director, a know issue even! We cleaned out those entries, ran “RegCompact Pro” on the hive and the result was a SYSTEM hive of about 2.7MB!

Below some references that give you some background about possible causes for this error, which we all checked. I found out that when you run into this issue, it can be hard to detect the real cause. Once you know it, like we did with the long list of “LEGACY_TRISVC*” entries, you will be able to recover the system like it was before (if you have a decent backup).

Error Message: Windows Could Not Start Because the Following File Is Missing or Corrupt: \Winnt\System32\Config\Systemced
http://support.microsoft.com/kb/269075

The System hive memory limitation is improved in Windows Server 2003
http://support.microsoft.com/kb/302594

Missing or corrupt Systemced – part 2 (Blog Justin @ TechNet)
http://blogs.technet.com/justinturner/archive/2006/12/21/missing-or-corrupt-systemced-part-2.aspx

EDIT 21/08/2008: Link from IBM
New in version 5.20.2
http://publib.boulder.ibm.com/infocenter/eserver/v1r2/index.jsp?topic=/diricinfo_5.20/fqm0_r_summary_of_changes_in_release_5.20.2.html

IC53455

Many TRISVC* registry entries are created on a Level-0 managed system running Windows 2000.

Posted in Windows | 2 Comments »