Managing ILO Users & Passwords from the Command Line
To follow up on the previous post I made about ILO scripting, this one runs through how you can change the password or add a user without having the login details to the ILO. I do thi al the time when I get new servers built in the field and while the local folks load the OS, they don't always remember to provide the username/password off the tag hanging off the server or they typo it, etc. This example also assumes that you have administrator level access to the actual server. You'll need hponcfg and the ILO driver loaded as discussed previously as well.
When you dump the ILO config, you'll be able to glean what users exist on the ILO from the info provided. In this example I'm just going to change the password for the admin user by using the following xml file. We'll set the password to "MyPassword".
The command to run is hponcfg /f iloconfig.xml where iloconfig.xml is the file holding the above text.
Note, as long as you're a local administrator on the machine, the credentials at the top in the <LOGIN> tag can be bogus.
Read/Write ILO Details from the Command Line
If you have access to an HP server running Windows but you don't have access to ILO information (such as IP info), you can export it all to an XML file using a tool HP includes in the Proliant Support Pack. The tool is called hponcfg.exe and it's located under C:\Program Files\HP\hponcfg on x86 and x64 systems.
In order to use hponcfg, you'll need to have the ILO driver installed on the system. If you go in Device Manager, you'll see an entry under Multifunction Adapters like this:

If the driver isn't loaded, you'll get an error when you try to run the tool:
HPONCFG RILOE-II/iLO setup and configuration utility
Version 1.4 (c) Hewlett-Packard Company, 2005
ERROR: CPQSMIF.DLL and SM2USER.DLL not found.
ACTION REQUIRED: Please install the latest Proliant support pack.
So, to write out the config to an XML file, you'd do something like this:
hponcfg /w ILOConfig.xml
You'll get a file something like this:
There's a few interesting things you can glean from this:
- The login at the top of the file is bogus, and as long as you're logged in locally as an administrator, you don't need to specify ILO credentials to use the tool
- Under network settings, because SPEED_AUTOSELECT is "Y" (think auto/auto on the NIC), you can ignore the next two entries for NIC_SPEED and FULL_DUPLEX
- Towards the bottom under users, it doesn't write out passwords, but it does write out usernames, so, we can see that this ILO has one user with username "admin"
You can use the XML file dumped here as a template that you can customize and import into other ILOs with the same hponcfg tool. To do this, you would run something like this:
hponcfg /f IloConfig.xml
This would import the contents of iloconfig.xml to the local ILO. As noted earlier as long as you're a local admin on the box, you can leave the bogus credentials at the top of the file. The tool is very finicky about the XML so if any of it is invalid, you'll get a confusing error pointing to the XML though rarely in the correct location. In general I'd recommend your remove any sections you're not configuring from your input file as the defaults will be retained.
Scripting the Installation of Supplemental Language Support
I've spent a lot of time lately working on automating server builds. One of my TODOs which I finally tackled today was installing support for the Complex Script and East Asian language packs which you normally have to manually check off in the regional control panel:

If you have run Active Directory in a large environment, particularly with domain controllers in Asia or the Middle East, chances are you've gotten this event before (or a similar one):
Event Type: Error
Event Source: NTDS ISAM
Event Category: General
Event ID: 604
Date: 11/17/2008
Time: 12:23:28 AM
User: N/A
Computer: TOKYO-DC02
Description:
NTDS (648) NTDSA: Locale ID 0x00000411 (Japanese Japanese) is either invalid or not installed on this machine.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
You get these when Outlook clients connect via NSPI and they're running one of the languages you need to manually install support for with the UI above. Checking the boxes, providing Windows with your install CD, and rebooting will take care of these errors. There's no particularly easy way to do this from a script though. Some Google searching revealed that KB289125 discusses how to do this. This blog entry also has a lengthy discussion in the comments.
I came up with the following little script which works properly on Windows Server 2003 (x86 and x64 versions). Note you'll need to reboot for these changes to be complete:
Dim shl
Set shl = WScript.CreateObject("WScript.Shell")
Dim fso
Set fso = WScript.CreateObject("Scripting.FileSystemObject")
' install complex character & far east support
WScript.Echo "Installing Complex Script and East Asian language support"
Dim intlConfig
Set intlConfig = fso.CreateTextFile("c:\scripts\intlunattend.txt")
intlConfig.WriteLine "[RegionalSettings]"
intlConfig.WriteLine "LanguageGroup = 7,11" ' 7 = Japanese, 11 = Thai
intlConfig.Close
shl.Run "cmd /c start /wait rundll32 shell32,Control_RunDLL intl.cpl,,/f:""c:\scripts\intlunattend.txt""", 0, True
NOTE: On Windows Server 2003 x64, you need to have access to the AMD64 and i386 folders in order for this to work. I spent a bunch of time running in circles on this.
The entry point called here will use the base Windows Setup APIs, so, it will reference these two registry keys by default:
- HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\SourcePath
- HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\ServicePackSourcePath
The correct syntax for these is to point to the parent folder containing the setup files. So, if your setup files are in C:\i386, you would set these registry keys to "C:\".
If you want to specify a custom path to the installer (let's say E:\AMD64), you should add /s:"E:\AMD64" to the command (remember to double quote in VBScript) right after the /f call:
shl.Run "cmd /c start /wait rundll32 shell32,Control_RunDLL intl.cpl,,/f:""c:\scripts\intlunattend.txt"" /s:""e:\amd64""", 0, True
You can also do all this during unattended setup. Take a look at the [RegionalSettings] section of deploy.chm if you're planning on doing this as there are some caveats and additional steps (nothing complex though). Also note that I believe all this is totally different in Vista/2008 so I don't think any of this will work in that scenario
Updated Attachments and Links
I just went through and fixed all of the posts (mostly scripts I shared) which referred to attachments which weren't there anymore. When I migrated this site to the new software I'm using a couple months ago, the migration tool didn't migrate attachments. All of the attachments from before are now back where they were, just as normal links since this new software platform doesn't support attachments directly. I apologize for any inconvenience encountered if you found a broken link.
Amazon EC2 on Windows
Amazon announced the ability to run Windows virtual machines on their cloud computing platform, EC2, a few weeks ago. I had the opportunity to play with the technology for a few weeks and I was really impressed all around with the experience. If you're looking at solutions for on demand computing or want to have a relatively inexpensive and flexible hosting solution you can control completely, you should definitely take a look at EC2.
I wrote a couple of articles for Amazon as part of the launch of Windows on EC2. The articles cover deploying an ASP.Net app on an EC2 instance and configuring SQL Server 2005 to work with the Amazon EC2 platform. If you're interested in getting a quick feel for how the platform works, check these articles out:
Retrieving Machine Serial Numbers from the Command Line
Here's a handy trick I discovered recently when I needed to get a lot of server serial numbers pretty quickly. Normally you have to login to the Dell or HP management website and dig around before you can get the serial number. Sometimes the website doesn't work and you're either negotiating with the local support guy to go find it for you (and then the data's suspect by definition), or you're just out of luck.
You can grab this easily from the command prompt. Look up the wmic switches for info on connecting remotely to a machine:
C:\>wmic
wmic:root\cli>systemenclosure get serialnumber
SerialNumber
ABC12345
wmic:root\cli>exit
C:\>
Zune Error
Apparently the error below from Zune is indicative of some sort of problem with your DRM data. The redirect is to KB 929642 which of course doesn't list the error message, but it was a useful clue.
---------------------------
Zune
---------------------------
Zune encountered a critical error and needs to close. For instructions on correcting this error, open the URL below in a web browser.
http://go.microsoft.com/fwlink/?
LinkId=105744&locale=409&geoid=f4&version=2.5.447.0&userlocale=409&system=ZuneClient
---------------------------
OK
---------------------------
On my x86 box which hosts the Zune software, C:\Documents and Settings\All Users\DRM is where all this stuff is. You can check by going to HKLM\Software\Microsoft\DRM and looking at the DataPath value. If you double click it, the registry editor is kind enough to decode the binary data to ASCII. The KB referenced above also has some info on where to find this folder on other platforms.
I simply opened a command prompt, renamed my DRM folder, and let the Zune software rebuild it:
C:\Documents and Settings\bdesmond>cd\
C:\>cd "Documents and Settings"
C:\Documents and Settings>cd "All Users"
C:\Documents and Settings\All Users>cd DRM
C:\Documents and Settings\All Users\DRM>dir /a
Volume in drive C has no label.
Volume Serial Number is F8EB-D584
Directory of C:\Documents and Settings\All Users\DRM
12/18/2007 05:44 PM <DIR> .
12/18/2007 05:44 PM <DIR> ..
05/25/2008 12:48 AM <DIR> Cache
08/06/2008 03:35 PM 3,739,648 drmstore.hds
12/18/2007 02:43 PM 1,536 drmv2.lic
12/18/2007 02:43 PM 1,536 drmv2.sst
05/25/2008 12:48 AM 1,194,512 IndivBox.key
12/18/2007 05:29 PM 4,867 migration.log
12/18/2007 03:53 PM 312 v2ks.bla
12/18/2007 03:53 PM 48 v2ks.sec
05/25/2008 12:48 AM 13,579 v2ksndv.bla
12/18/2007 05:29 PM 9,722 v3ks.bla
12/18/2007 05:29 PM 740 v3ks.sec
10 File(s) 4,966,500 bytes
3 Dir(s) 27,084,025,856 bytes free
C:\Documents and Settings\All Users\DRM>cd ..
C:\Documents and Settings\All Users>attrib drm
SH C:\Documents and Settings\All Users\DRM
C:\Documents and Settings\All Users>attrib -s -h drm
C:\Documents and Settings\All Users>move DRM DRM2
1 file(s) moved.
C:\Documents and Settings\All Users>
Word Tip - The Draft View Gutter
Since I've been living in Microsoft Word lately, I figured why not take some time for a couple more handy Word tricks. This one is about getting a gutter to show up in Draft view so you can see what styles have been applied to text. If you've ever worked with a complex stylesheet before, especially one which is post-processed by some other tool, getting the styles properly applied to your content, and also debugging messed up styles is important. The display I'm talking about looks something like this in my sample document:
You'll notice the various style names which apply to that particular line (and all the lines until the next style name). If you could see my document, you'd be able to see all the different text formatting in my document. If you're looking to get this functionality, it's pretty easy, actually. Go to the Office button and then Word Options. Select Advanced on the left and scroll down to the display section in the main pane.
Set your style area pane width to something like 2". You can drag the divider in Word once you get the pane showing (only in Draft and Outline views, accessible via the Draft button on the View tab of the ribbon).
Word Tip - Outline View and Document Map
Another handy Word tip today is using Outline view to work with big documents. If you've got a sizeable document, chances are your document is also structured hierarchically. By this I mean that you are probably using multiple levels of Heading styles to organize your content. If you flip to Outline view (on the View tab of the ribbon), Word will give you a collapsed view of your document based on these heading style elements.
You can use the Show Level option on the Outlining ribbon to manage how deep the outline is, and you can also expand and collapse sections using the +/- buttons embedded in the document. The main use I have for Outline view is actually for rearranging documents for flow. You can drag the expand collapse buttons for different sections around in the Outline and Word will rearrange your document based on those actions. If you move a level 1 heading, everything below that heading will be moved as well.
You can also edit document text in Outline view although I've never really been comfortable doing this compared to working in Draft mode or the usual Print layout view.
Similar to the outline view is the document map. If you check the Document Map checkbox on the View tab of the ribbon, the document outline will appear in a task pane to the left of the main text editor and you can click on the different headings to jump around the document.
Slick Site - GrubHub.com
If you happen to live in Chicago, New York, Boston, or San Francisco, GrubHub.com is definitely a site worth checking out. I'd heard of it but never tried it until last night, and it's great. The site has a very extensive collection of restaurants (at least for me in Chicago) which deliver based on my address. You can filter on cuisine and a number of other parameters. One of the most useful filter parameters is the "currently delivering" one which at 2AM this morning when I decided it was time for dinner, was very helpful. I found a Mexican place in the filtered list and ordered through their interactive menu on GrubHub.com. My food showed up well within the prescribed time and was quite good actually. I would have never known of the restaurant without this site as it's not really near anyplace I ever go.
I did a bit more poking around on the site and their business model is around a commission they collect for orders placed to restaurants which allow you to order online through GrubHub.com. They also list restaurants that don't allow this which is nice, but I'll certainly remember that the site only makes money with the restaurants which support online ordering.


