Nice blog post about Microsoft WSUS and issues with that…
Posted by bartvdw on July 2, 2008
Posted in Windows | Leave a Comment »
PowerShell: How to retrieve disk size & free disk space for a list of computers (input file)
Posted by bartvdw on June 19, 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 | 5 Comments »
Windows 2000 could not start because the following file is missing or corrupt: \WINNT\SYSTEM32\CONFIG\SYSTEMced
Posted by bartvdw on June 18, 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
Posted in Windows | 2 Comments »
PowerShell: ExecutionPolicy
Posted by bartvdw on April 22, 2008
I know I waited far too long to start working with PowerShell. But OK, here we are. And immediately encountered something. By default it sets some security related to running scripts. Only when I did what it said, I was unable to change that security!
OK in short, after you install PowerShell, it sets the “ExecutionPolicy” for scripts to “Restricted”, which means you’re not allowed to execute scripts. Not very interesting… So I used the “Set-ExecutionPolicy RemoteSigned” command to change, but this returned an error:
Set-ExecutionPolicy : Access to the registry key ‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell’ is denied.
At line:1 char:20
+ Set-ExecutionPolicy <<<< RemoteSigned
- Open registry
- Browse to key HKLM\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell
- If “ExecutionPolicy” does not exist, create it as REG_SZ with value “RemoteSigned”
- Open PowerShell and use the command “Get-ExecutionPolicy” to see it is done correctly
It’s only obvious that if another security level is desired, you adapt the value…
Posted in PowerShell, Scripting | 2 Comments »
Windows Command Reference
Posted by bartvdw on April 2, 2008
Great, they have release a command reference for Windows Vista, Windows Server 2003, and Windows Server 2008! And this in a very handy .chm file!
Windows Command Reference
http://www.microsoft.com/downloads/details.aspx?FamilyID=5FB255FF-72DA-4B08-A504-1B10266CF72A&displaylang=en
Posted in Windows | Leave a Comment »
Joe Bar Team: Official website
Posted by bartvdw on April 2, 2008
http://www.lucane.fr/frame2.htm
(Sorry it’s in French only apparently…)
Posted in Fun | Leave a Comment »
DFS: Important fixes
Posted by bartvdw on April 2, 2008
“The request is not supported” error message when you try to create a second DFS domain root
http://support.microsoft.com/kb/813053
You cannot create more than one domain-based DFS namespace on a computer that is running Windows Server 2003, Standard Edition
http://support.microsoft.com/kb/903651
Posted in Windows | Leave a Comment »
VBScript: Bypass the "Open File – Security Warning" dialog from VbScript
Posted by bartvdw on March 30, 2008
You have had it before: the “Open File – Security Warning”. Nice feature, but not very interesting during execution of scripts. However you may not want to turn it off.
The simple solution in VBScript has been offered by MS themselve: the SEE_MASK_NOZONECHECKS environment variable. Change it at the start of your script and restore it at the end. Plain & simple!
Sample code (same as the KB article):
set oShell= CreateObject(“Wscript.Shell”)
set oEnv = oShell.Environment(“PROCESS”)
oEnv(“SEE_MASK_NOZONECHECKS”) = 1
oShell.Run “c:\ms04-038\WindowsXP-KB834707-x86-enu /quiet /passive /norestart”,0,True
oEnv.Remove(“SEE_MASK_NOZONECHECKS”)
The Open File – Security Warning dialog box is displayed when you try to silently install a hotfix or an update by using a Visual Basic script in Windows XP Service Pack 2
http://support.microsoft.com/kb/889815
Posted in Scripting, VBScript | 1 Comment »