Search Me

Wednesday, July 6, 2011

Adding the HP Proliant Support Pack (PSP) to an OSD Task Sequence

The HP Proliant Support Pack, or PSP, can easily be addded to an SCCM OSD Task Sequence.   With a bit of customization, you can have the step install on all HP hardware and return a success back to SCCM. 

If you deploy with the PSP "out of the box", it may return a error code that doesn't translate to success in SCCM.  To get around that, we will use a batch file to do the work.

Here is the process:
  1. Create an "installation source" directory with all of your other packages.  Extract the PSP to this location.
  2. Create a new CMD file (I call it OSD_SilentInstall.cmd) and put it in this folder.  Copy the contents of the script below into this file and save it.  You should make any adjustments that are required at this point, but the script should work out of the box for just about any deployment scenario.
  3. In the SCCM console, create a new Package under Software Distribution.  I called it HP Proliant Support Pack v8.75, but the name is not important.  Specify the location you created in step one as the Installation Source.
  4. I feel the need to remind you to assign the package to a distribution point, replicated it, and make sure it replicated.  I can't tell you how many hours I've wasted over the years, just becuase I forgot to "update distribution points".  So -- do it now!
  5. Create a new program for this Package.  When chosing the executable, change the dropdown (lower right) to show all files.  Choose the CMD file that you created above.
  6. Edit your task sequence and create a new step called "HP ProLiant Support Pack".  Again, you can call it anything you want, the name isn't important.  This step should be an "Install Software" task available from Add > General > Install Software.  You should then choose the package you created in step 3 and select the installation program you created in step 5.
At this point, you're done.  It will install for all machines.  But what if you execute this sequence on non-HP hardware?  To add a restriction so it only installs on HP hardware:
  1. Open the Task Sequence back up and find the Task that you created to install the PSP. 
  2. Click on the Options Tab
  3. Click the Add Condition button and  choose WMI Query.  Enter the following query into the WQL Query text field and hit OK:

         Select * From Win32_ComputerSystem Where Manufacturer="HP"    
  4. Click OK.
Your sequence should now only apply to machines that identify themselves as having a Manufacturer of HP. 

As promised, here is the code for the batch file.  Most of it is not required, so you can feel free to edit out what you do not find necessary.  The important part is that your CMD script interpirt the result codes from the PSP and exit with the apropriate errorlevel.

:Init
  @Echo Off
  Cls
 
:Main
  Echo HP Proliant Support Pack
  Echo Source : %~dp0
  Echo ===============================================================================
  Echo Installing the HP Proliant Support Pack
  Echo Command: "%~dp0hpsum.exe" /use_latest /allow_non_bundle_components /express_install
  "%~dp0hpsum.exe" /use_latest /allow_non_bundle_components /express_install
 
:CheckForErrors
  Echo HP Proliant Support Pack Stauts:
  If "%errorlevel%"=="0" (
     Echo *******************************************************************************
  Echo                            INSTALLATION FAILED!
  Echo *******************************************************************************
  exit 1
  )
 
  If "%errorlevel%"=="1" (
     Echo Installation Successful!
     exit 0
  )
 
  If "%errorlevel%"=="2" (
     Echo Installation Successful, but a reboot is required.
     exit 0
  )
 
  If "%errorlevel%"=="3" (
     Echo Installation was canceled, or no components were updated
     exit 0
  )
 
  If "%errorlevel%"=="9009" (
     Echo Installation did not complete.  Check the path and make sure that the
  Echo Installation exists at the specified location:
  Echo Path: %~dp0
  Exit 1
  )
 
:End
  Echo An unknown status code was returned from the PSP.
  Echo This status code is [%errorlevel%].  This will be treated as a success,
  Echo but please check the installation to make sure it completedly properly!
  Exit 0