Saturday, June 16, 2007

I've been playing around this weekend with PowerShell and the Win32_Volume WMI class and have written some PowerShell scripts to exploit this class.

To get the volumes on a system is trivial:

$volumes = Get-WMIObject Win32_Volume

This returns an array of volume objects which you can iterate through and display. To display the whole collection, or to just see the first volume, you could do this:

$volumes$volumes[0]

See here for a simple script that obtain the volumes on a system and then displays their information. Then look at this script to run a chkdsk on the system.

You can also use a method to determine how badly fragmented a volume is, and another to run a defrag pass on a volume. Look here for a script to display a defrag analysis of the C:\ and here to actually defrag the disk.

[Later Update]

The Win32_Volume WMI class is not available on all versions of Windows - I ran the scripts on a Longhorn B3 server.

Sunday, June 10, 2007

The National Institute of Standards and Technology (NIST) has published a 387-page Guide for Assessing the Security Controls in Federal Information Systems, which you can freely download as a PDF document. Technically this document is a draft (the third draft), but even so, it contains good information on the fundamentals of security controls and details on the process you undergo to develop and implement controls. This is a useful read for anyone in the IT Security business.

Tuesday, June 05, 2007

MS has announced that IIS7 Added to Server Core. This sounded fantastic, at first, till I read the fine print. While IIS will be supported, there is no .NET support still, thus no PowerShell support. :-(

Microsoft has just released an updated beta, dubbed Beta 2, of it's Live Writer blogging tool. I use Live Writer pretty much exclusively for this blog. The biggest feature, for me at least, is in the inline spell checking.