Thursday, April 22, 2010

Henry Ford Quote -

"Thinking is the hardest work there is, which is the probable reason why so few engage in it."

Monday, April 19, 2010

Script to install Windows Updates automatically

Occasionally I have to build a one-off server - a server that doesnt fit our existing defaults. When I do this, I like to start with a fresh install from media, patch the system, and then install whatever app I need. However, the installation of patches can become a tedious bore that sucks your time away.

A little searching and I found a simple vbscript at that searches, downloads, and installs all applicable updates for your system. running it is simple:
  1. Go to and ensure you have the latest WU agent installed
  2. Execute the vbscript
  3. Repeat until no more updates are listed
There is another option called wuinstall ( that uses C++ to install updates. I havnt used it yet, but it looks promising

Monday, April 12, 2010

Collecting computer inventory using WSUS

I was recently tasked with collecting a list of software installed in my environment (desktops and servers). In the past, I would have used a WMI script to query the computers and export it into a database or spreadsheet. However, the more recent Windows versions block all remote connections by default, meaning my WMI script would fail.
A little research made me began to look at WSUS (which was already used to patch our environment). I realized there was a view (PUBLIC_VIEWS.vComputerInventory) that is empty, but looks like it should hold inventory information. There is also a table (tbInventoryRule) that lists an XML to inventory hardware and software of client machines. So it's possible, how do I enable it.

I finally came across a field - tbConfigurationC.CollectClientInventory=0. I executed the following command to update its value.
update tbConfigurationC set CollectClientInventory=1

I told my client to rescan for updates, and now when I view PUBLIC_VIEWS.vComputerInventory, I see hardware inventory, and Add/Remove Programs information.

Connecting to Windows Internal Database

I recently had to retrieve some information from a WSUS server and was unable to connect to it from my management station. A little research identified that it was using the Windows Internal Database, which doesnt allow remote connections. Below is from that describes how to overcome this shortcoming.

Microsoft products such as Windows Server Update Services (WSUS) 3.0 and Windows Sharepoint Services (WSS) 3.0 ship with SQL Server 2005 Embedded Edition. Now called the Windows Internal Database, more and more system administrators charged with managing WSUS and WSS are faced with the challenge of managing these databases. Since most of these system administrators are not full-fledged DBAs, how do they manage the Windows Internal Database?
The Windows Internal Database is an embedded data service that can only be used by a handful of Windows Services. It is designed in such a way that you are not allowed to connect to and use this particular database service for non-Microsoft products. By default, installing either WSUS 3.0 or WSS 3.0 will create the databases on the C:\ partition and will cause administration issues such as insufficient disk space. It is quite confusing to manage this SQL Server instance as it does not appear as a SQL Server service nor are there management tools included with the products. The easiest way is to use SQL Server Management Studio Express. You can install a copy of SQL Server Management Studio Express on the server running your WSUS 3.0 or WSS 3.0. You then register this instance using Named Pipes as this is the only configuration for connectivity. Use this server name when you register this instance
Once you've managed to register this instance in SQL Server Management Studio Express, you can now administer the WSUS 3.0 and WSS 3.0 databases like shrinking the database files or moving them to a different disk partition dedicated for them to avoid insufficient disk space issues.
If you prefer to use scripts to manage these databases, you can download and install the SQL Server 2005 Command Line Query Utility - sqlcmd . This tool will be installed, by default, on this directory
C:\Program Files\Microsoft SQL Server\90\Tools\binn
To connect to the database instance, you need to run the sqlcmd.exe utility, passing the instance name and your credentials
sqlcmd -S \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query –E
You can then run your administrative T-SQL scripts once connected to this database instance.
While these are possible reasons to administer the Windows Internal Database, it is not recommended to do anything beyond performing backups, moving or shrinking the database files. Modifying database schema or database properties would break supportability of these products. Plus, any changes made to these databases can be overwritten by the products' service packs or cumulative updates.

Friday, April 09, 2010

Identifying the HBA WWNs in a Windows system

Every once and a while I have to hunt down the WWN of an HBA. On Linux systems, there is normally a combination of LSPCI and searching in /proc that can get you the answer. But how to do it on Windows?

I found the page, that points to a MS Utility that quickly scans and outputs the WWN for all installed HBAs.

Wednesday, April 07, 2010

Change block tracking in vSphere

One of the new features in vSphere is the ability to track which blocks changed between backups. This is useful for the new generation of backup software that is capable of performing a disk-level backup of a VM, and now can perform incremental backups. So, how do you enable it without manually editing all your VMs?

The post at has information on enabling and identifying if tracking is enabled on your VMs

Get-VM | Get-View | `
Sort Name | Select Name, `

Tuesday, April 06, 2010

Upcoming MS Scripting Games

I am looking forward to the upcoming scripting games by MS. I have done these before and was always surprised by what I submitted and how good/bad it was compared to others. Give it a shot and see!

2010 Scripting Games

Grab this badge here!

Monday, April 05, 2010

Windows Storage Server 2008 password

I found that an ISO for the 2008 Storage Server was available on MSDN, so I thought I would try it out. I really like the idea of multiple connection types (CIFS, NFS, iSCSI), as well as the automatic file-level deduplication features.

When I first downloaded and installed it, it prompted me to log in, but I didnt have the password. So what do you do when you dont have a password? You change it! I went to and downloaded the password recovery ISO and blanked it out.

That worked fine the first time, but I hated having to blank out passwords when I should have it. I googled around and found, which identifies the password as "wSS2008!" (no quotes). Why this wasnt spelled out on MSDN I dont know.

Removing inactive hosts from an EMC SAN

There is a moderate amount of churn in my FC fabric - new hosts being added/removed, new storage being added/removed, systems being moved between locations, etc... This results in Navisphere reporting the following errors
Server initiator (50:01:39:71:00:0F:91:1A:50:01:39:70:00:0F:91:1A) on Server (SAN1) no longer has an active connection to the storage system.

While this is a benign error, I dont like seeing it and I try to clean it up as much as possible. I found the following NaviSecCli command that cleans up all inactive HBAs from your SAN.
NaviSECCli.exe -user -password -scope 0 -h port -removehba -all

NOTE: This command should be used with caution as it removes all inactive HBAs. If you have a host down for maintenance (or just happens to be rebooting), it will remove the host from the SAN.

FSMO role placement woes

I recently ran into some problems that I tracked down to the placement of the FSMO roles in my domain. I remember reading about role placement years ago, but the task is so rarely performed, that it is easy to forget. Below are the basic rules - referenced from

  1. Group PDC Emulator and RID Master on same system
  2. Don't put the Infrastructure Master on a Global Catalog server
  3. Group the Schema Master and Domain Naming Master on the same Global Catalog server

Thursday, April 01, 2010

VMware daily report

I have been looking for a method to create a daily report that details out my VMware infrastructure and highlights any issues. It looks like I may have found what I am looking for at

Linked clones in VMware with Powershell

Linked clones in VMware via powershell