Windows Server

 

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:

So, to write out the config to an XML file, you'd do something like this:

You'll get a file something like this:

Full Article » Share »
 

Managing ILO Users & Passwords from the Command Line

To follow up on the 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 hold…

Full Article » Share »
Sponsored Content
 

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):

You get these when Outlook clients connect via NSPI and they're running one of the languages you need to ma…







Full Article » Share »
 

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 .

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:

Full Article » Share »
 

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:

Full Article » Share »
 

Cool Remote Shutdown Trick

I learnt today how to shut down/reboot a huge number of computers en masse regardless of whether or not they're turned on. Windows XP and Server 2003 have a command line utility called “shutdown”. If you pass a /i switch to it, a cool GUI interface pops up. At the top, you can add one or more computers to reboot/shutdown. I generated text file dumps of my computer labs with each computer on its own line. I paste the whole thing into the box, and click okay. From there, I just set the wait time to two seconds, pick a reason for the shutdown/reboot, and click okay. The utility iterates through the list gracefully, and handles any unreachable machines without error. Machines which are inaccessible have their names printed out the command line once the utility is through.

Full Article » Share »
Sponsored Content
 

How to Sysprep in Windows Vista and Windows Server 2008

Note: This post discusses Sysprep as it pertains to Windows Vista and Windows Server 2008. If you’re working with a different version of Windows, check out these posts:

I thought I'd document how to setup the new Sysprep process equivalent on Windows 2008 since the old setupmgr tool for making sysprep.inf's doesn't exist anymore (and neither does the sysprep.inf file itself).

The first step is acquiring the Windows Automated Installation Kit (WAIK) from somewhere. You can get this package in ISO file format from Microsoft's website at . The download is about an 800MB install on a Windows Server 2003 SP2 x86 machine.

The tool of choice for building your Sysprep configuration is the Windows System Image Manager (WSIM). When you start it you'll get a blank screen like this:

Full Article » Share »
 

How to Build a Sysprep Answer File for Imaging - Windows 2000, XP, and 2003

Note: This post discusses Sysprep as it pertains to Windows 2000, Windows XP, and Windows Server 2003. If you’re working with a newer version of Windows, check out these posts:

Sysprep is one of those things that seems to have a certain mystique that surrounds it. My experience is that administrators either don't run it because they don't understand it or because they don't know how. Urban legend is also that it’s just not necessary to run Sysprep in some scenarios. The bottom line is that when making an image for duplicating Windows installs Sysprep is necessary as part of the imaging process. I'm not going to cover what Sysprep does here since that's not the focus, but the summary version is that Sysprep removes all identifying information about the source machine when it's executed (e.g. Computer name, SID, Product key, etc.). The rest of this post is geared primarily towards …

Full Article » Share »
 

Getting Total Installed Memory with WMI

Getting the amount of memory installed in a machine with WMI is a bit confusing particuarly if you only read the docs partially. I was initially using Win32_ComputerSystem::TotalPhysicalMemory, but the documentation warns  "Be aware that, under some circumstances, this property may not return an accurate value for the physical memory. For example, it is not accurate if the BIOS is using some of the physical memory."

The suggested alternative is Win32_PhysicalMemory::Capacity. This was an easy switch in my script, but, I was getting numbers I knew were wrong for the machines I was querying. The part I didn't read was that each instance of Win32_PhysicalMemory represents a single stick of RAM, so, you need to loop through them all and take the sum to get the RAM installed. This snippet will get you the total memory in megabytes:

Set colItems = wmiSvc.ExecQuery("SELECT * FROM Win32_PhysicalMemory", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)


Full Article » Share »
 

Script to Collect Local Administrators Membership from List of Machines

Another script I wrote the other day, this one will take an input file called workstations.txt and produce a CSV which is easy to view in Excel and look at the local administrators group membership for the list of machines. The script could easily be modified to get the list from Active Directory although he framework I usually use for these is setup for a text file so I just export a list if AD is my source. The script will attempt to ping the machine before connecting in order to try and determine availability. If you have firewalls or routers filtering ICMP between the target machine and the host executing the script you may need to remove or modify this feature.

The script produces two files - a CSV and a log file. These three parameters are all configurable at the top by modifying lines 11 - 13:


The script is attached below in a ZIP file. If you have any …

Full Article » Share »
 

Script to Collect Basic Inventory Data From Machines

This is another useful script I sometimes use when I need to collect some basic inventory data from a list of machines. The attached vbscript takes an input file called workstations.txt and produces an comma separated output file called workstationinventory.txt. You can modify the two constants at the top of the file as noted below if you want to change this:

The script currently only outputs a limited set of information but the framework is there to extend it to collect really anything available via WMI. The fields currently exported are:

  • Make
  • Model
  • BIOS Version
  • Operation System
  • Serial Number

To configure the input and output file modify lines 12 and 13:

If you're looking for some guidance on other WMI data, check out the .

The script is attached below in a zip. If you have any comments, bugs, etc feel free to leave them in the comments field an…

Full Article » Share »